This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Possible fix for sporadic test failure from loop_dispatch.c
ClosedPublic

Authored by hbae on May 2 2022, 4:08 PM.

Details

Summary

This patch tries to fix sporadic test failure after the change https://reviews.llvm.org/D122107.
Made the test wait until every thread has at least one loop iteration.
We may need to relax the check if this does not fix the problem.

Diff Detail

Event Timeline

hbae created this revision.May 2 2022, 4:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2022, 4:08 PM
hbae requested review of this revision.May 2 2022, 4:08 PM

Thanks for the fix! I'm quite confident that this change will fix the sporiadic test failures (most probably under high system load).

I suggest to refer D122107 in the commit message.
And I also suggest to use the actual team size in the OMPT_WAIT, just to prevent deadlock in case less threads are provided.

openmp/runtime/test/ompt/worksharing/for/loop_dispatch.c
26
36
hbae updated this revision to Diff 426694.May 3 2022, 7:02 AM
hbae edited the summary of this revision. (Show Details)

Applied suggested changes.

This revision is now accepted and ready to land.May 3 2022, 12:16 PM