parallel-runtimes / lomp

Little OpenMP Library
Apache License 2.0
155 stars 18 forks source link

nonmonotonic:dynamic (static steal) improved implementation fails. #6

Open JimCownie opened 3 years ago

JimCownie commented 3 years ago

Describe the bug Enabling the version of nonmonotonic dynamic loop scheduling which tries to avoid atomics on the normal, consume local work, path fails on X86. When trying to run the benchmarks in microBM/scheduling.cc the nonmonotonic benchmarks occasionally assert on Skylake since the "no work available anywhere" test sees that more iterations have been started than exist!

To Reproduce Disable the #if (1) to change the implementation of

template <typename unsignedType>
bool contiguousWork<unsignedType>::incrementBase(unsignedType * basep) {

in loops.cc to use the implementation which avoids an atomic operation when returning local work.

Run the test code on X86_64.

Desktop (please complete the following information):