Skip to content

Commit ad8e6f4

Browse files
authored
Merge pull request #923 from rlratzel/0.14-pagerank_fix
[BUG] Updated pagerank with @afender 's temp fix for double-free crash
2 parents d5397a5 + 7c01960 commit ad8e6f4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
- PR #889 Added missing conftest.py file to benchmarks dir
6767
- PR #896 opg dask infrastructure fixes
6868
- PR #907 Fix bfs directed missing vertices
69-
- PR #911 Env and changelog update
69+
- PR #911 Env and changelog update
70+
- PR #923 Updated pagerank with @afender 's temp fix for double-free crash
7071

7172
# cuGraph 0.13.0 (31 Mar 2020)
7273

cpp/src/link_analysis/pagerank.cu

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ bool pagerankIteration(IndexType n,
7777
return true;
7878
} else {
7979
if (iter < max_iter) {
80-
std::swap(pr, tmp);
80+
// FIXME: Copy the pagerank vector results to the tmp vector, since there
81+
// are still raw pointers in pagerank pointing to tmp vector locations
82+
// that were std::swapped out in the solver. A thrust::swap would
83+
// probably be more efficent if the vectors were passed everywhere instead
84+
// of pointers. std::swap is unsafe though. Just copying for now, as this
85+
// may soon be replaced by the pattern accelerator.
86+
copy(n, pr, tmp);
8187
} else {
8288
scal(n, (ValueType)1.0 / nrm1(n, pr), pr);
8389
}

0 commit comments

Comments
 (0)