[Openmp-commits] [PATCH] D43191: [OMPT] Fix test tasks/serialized.c with optimization

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Feb 14 10:11:02 PST 2018


protze.joachim added a comment.

This behavior is right (p.417,l.5):

> The binding of argument parallel_data is the current parallel region. For the implicit-task-end
>  event, this argument is NULL.

And since we cannot access the ID, if NULL is passed as the address of parallel_data, the callback prints 0.

The reason for this behavior is that barrier-end and implicit-task-end of worker threads is not synchronized with the parallel-end of the master and therefore the parallel-data is most probably gone at that point.



================
Comment at: runtime/test/ompt/tasks/serialized.c:146
+  // CHECK: {{^}}[[THREAD_ID]]: ompt_event_barrier_end
+  // CHECK-SAME: parallel_id={{[0-9]+}}, task_id=[[IMPLICIT_TASK_ID]]
 
----------------
Hahnfeld wrote:
> omalyshe wrote:
> > Looks like parallel_id should be checked for PARALLEL_ID here. 
> > Same on line 149.
> This doesn't work, `parallel_id=0` for these two events. I'd guess that's because the parallel region ended in the barrier, @protze.joachim?
Yes, parallel_id=0 would be the right check for all worker threads.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D43191





More information about the Openmp-commits mailing list