Some code path in hier barrier gather misses ompt callbacks in reduction.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I noticed this when running check-openmp with hier barrier by using https://reviews.llvm.org/D122645
Can you add extra run lines to openmp/runtime/test/ompt/synchronization/reduction/*_reduce.c in order to trigger the different barrier implementations?
Can you add extra run lines to openmp/runtime/test/ompt/synchronization/reduction/*_reduce.c in order to trigger the different barrier implementations?
Ok.
This is a bit out of topic, but currently tree_reduce tests fails on dist barrier but I think this is a test problem.
As spec says:
If a task participates in multiple reductions, each reduction may be bracketed by its own pair of reduction-begin/reduction-end events or multiple reductions may be bracketed by a single pair of events.
I read this as reduction-begin & end event may occur 1 to ~ number of reductions. Dist barrier put 1 ompt event for reductions surrounding for-loop while other barriers call ompt event in each reduction
and therefore this results in mismatch in the number of called events. I don't know lit's CHECK pattern matching can handle to check if lines appear 1 ~ X times, let me think. (maybe just easier to fix dist barrier handling anyway)
I agree, the expected output does not fit the general case of reductions.
As a workaround, I would change the check prefix for reduction 2-n from CHECK to MULTIPLE and add --check-prefixes CHECK,MULTIPLE for the RUN-lines, where multiple pairs of reduction callbacks are expected. So the default would be "at least one" pair of callbacks.
Thanks for the suggestion. I tried if lit's regex can be used but got no luck. So, I decided to follow the advice.
I think it is better to separate patches and here is the patch to run barrier/reduction test for each barrier : D123359