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

Validation of random graph construction #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ehein6
Copy link

@ehein6 ehein6 commented Jan 4, 2017

Parallel random graph construction in GraphBIG is not implemented correctly.

To illustrate the problem, I added validation code to the end of the parallel random graph construction benchmark. It dumps the graph back to an edge list after construction, and then compares with the randomly generated list the graph was constructed from. When I run with more than 1 thread, the validation usually fails, although it occasionally passes.

C++ standard library containers like vector, list, and unordered_map are not thread-safe. Calling push_back concurrently on the same data structure without synchronization is leading to data corruption in this benchmark. Locking each vertex before adding an edge should solve the problem, but this will have a significant impact on performance.

After the graph has been constructed, dumps all
the edges to a list and compares with the list
of randomly generated edges.
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.

1 participant