[Openmp-commits] [openmp] [OMPT] Fix issue #84180 (PR #84215)

PEREIRA Romain via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 28 06:56:47 PDT 2024


rpereira-dev wrote:

I started just that @jprotze and then realized we could generalize tests to `task_schedule` callbacks, not only cancellation.

What about tracking tasks bound on threads in the `callback.h` tool and ensuring coherency with the `prior_task_data` passed by the runtime ?
I have done just that but it implied `sed`-ing most test files which assumed `thread_data->value` is a thread id, which is now a couple (thread_id, current_task_id).

I added #84180 minimal example to `test/ompt/cancel/cancel_taskgroup.c` and a CHECK-NOT `0: wrong task_schedule`

Good thing is grepping `0: wrong task_schedule` in test outputs detects issues in:
- `ompt/tasks/task_types_serialized.c` - that is #83883 
- `ompt/parallel/region_in_expl_task_task_frames.c` - yet another issue related to `task_schedule` callbacks

I have not added a check in these 2 tests as this PR does not fix it.

Let me know if thats too much modifications, I can still revert and check only the `test/ompt/cancel/cancel_taskgroup.c` without modifying the rest of the world

https://github.com/llvm/llvm-project/pull/84215


More information about the Openmp-commits mailing list