Skip to content

Validation of random graph construction#7

Open
ehein6 wants to merge 1 commit intographbig:masterfrom
ehein6:graph-construct-validate
Open

Validation of random graph construction#7
ehein6 wants to merge 1 commit intographbig:masterfrom
ehein6:graph-construct-validate

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

Comments