Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adjusts the OpenMP scheduler for the hooking loop in
cc_sv.The current scheduler performs a static partitioning of the loop iterations, but for structured graphs like
twitter.sgwhere connections are concentrated in certain node index ranges, this leads to thread workload imbalance.If we use 4 worker threads on the twitter graph and examine how the current static partitioning works, we see threads 0, 2, and 3 are assigned less intensive portions of the graph.

Below is a bandwidth-estimate measurement with a tool I worked on, ZRay. The run is performing 5 trials. Threads 0, 2, and 3 are largely idle.

Updating the OpenMP pragma to match the scheduler currently used in

cc, the thread imbalance is resolved.#pragma omp parallel for schedule(dynamic, 16384)This leads to about a 2.5X speedup when processing the
twitter.sggraph.Before:
After: