Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework WCC implementation #202

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Dtenwolde
Copy link
Contributor

Fixes #200

The old WCC implementation did not work properly in parallel, leading in some cases to a segmentation fault because memory was incorrectly written to and read from (#200).

We rework the implementation of WCC in this PR to fix this issue and also improve the performance. See https://github.com/yoba7/connected-components/tree/main for details on the current implementation.

The algorithm works single-threaded (similar to our PageRank implementation) to avoid race conditions when two different threads would explore the same connected component at the same time and potentially overwrite each other. Perhaps a future implementation could look at making this multithreaded.

On a graph of 3.5M edges, it takes approx. 1.25 seconds, whereas networkX takes 7.5s (excluding load times)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation Fault on Weakly Connected Component
1 participant