This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Commit 5dfa0e6
committed
fix(cugraph): filter isolated nodes in CreateCugraphFromMemgraph
Fixes "Index out of range!" error when running cuGraph algorithms on
graphs containing isolated nodes (nodes with no edges).
The bug: CreateCugraphFromMemgraph passed ALL nodes to cuGraph via
cu_vertices, but the GraphView's inner_to_memgraph_id_ mapping only
reliably maps nodes that appear in edges. When cuGraph returned results
for isolated nodes, GetMemgraphNodeId() failed because those node IDs
weren't properly mapped.
The fix: Only include nodes that have at least one edge (in-degree > 0
or out-degree > 0) in the vertex list passed to cuGraph. This is also
semantically correct - isolated nodes have betweenness/PageRank/etc of
zero by definition since no paths traverse them.1 parent 04a0455 commit 5dfa0e6
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | | - | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
| |||
0 commit comments