IntelligentSoftwareSystems / Galois

Galois: C++ library for multi-core and multi-node parallelization
http://iss.ices.utexas.edu/?p=projects/galois
Other
310 stars 131 forks source link

Where is the interaction between scheduler and data reading ? #381

Open jiumeiliuxu opened 2 years ago

jiumeiliuxu commented 2 years ago

When running the example \lonestar\tutorial_examples\SSSPPushSimple.cpp, the obim scheduler provides higher priority nodes. Where is this step involved in the code? I only saw push and pop functions in obim.h, but I didn't find where they were called.

nicelhc13 commented 2 years ago

Those push/pop functions involve the logic your are mentioning. Push() pushes indices to thread local storagse based on user provided indexer (https://github.com/IntelligentSoftwareSystems/Galois/blob/58453dd834ae2e4c335bcfdbf16bcd379353455d/libgalois/include/galois/worklists/Obim.h#L364).

Pop() pops indices in FIFO order from the thread local storages (https://github.com/IntelligentSoftwareSystems/Galois/blob/58453dd834ae2e4c335bcfdbf16bcd379353455d/libgalois/include/galois/worklists/Obim.h#L401)

Based on this high level logic, several optimizations (like fast/slow paths) are applied. Please let me know if you have further questions.