networkit
networkit copied to clipboard
ParallelConnectedComponents cause Segmentation fault
Hi, any idea what's the problem?
import networkit as nk
x = nk.Graph(6)
x.addEdge(0, 1)
x.addEdge(1, 2)
x.addEdge(3, 4)
x.addEdge(4, 5)
cc = nk.components.ParallelConnectedComponents(x)
cc.run()
cc.hasFinished()
>> True
cc.numberOfComponents()
>> 2
cc.getComponents()
Segmentation fault (core dumped)
I replicated your issue and, after some testing, it seems that ParallelConnectedComponents
is bugged. Our tests are not failing becausegetComponents()
is never tested for this algorithm.
My recommendation is to use ConnectedComponents
, even though it is not parallel, the algorithm is quite fast.
My recommendation is to use
ConnectedComponents
, even though it is not parallel, the algorithm is quite fast.
I need to process few billions of CC, unfortunately single threaded ConnectedComponents
not working in my case....
Closing this issue. We merged a PR that fixes this problem. This will be part of the next (possibly bug-fix) release. You can use it right now by installing from the master-branch (or downloading a wheel artifact from CI).