[Openmp-commits] [PATCH] D39853: [OMPT] Fix inaccuracies in worksharing tests

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 9 13:24:25 PST 2017


Hahnfeld added inline comments.


================
Comment at: runtime/test/ompt/worksharing/single.c:12
   int x = 0;
   #pragma omp parallel num_threads(2)
   {
----------------
protze.joachim wrote:
> In other tests we use something like:
> ```
> int cond=0;
> #pragma omp parallel num_threads(2)
> {
>   if(omp_get_thread_num==1)
>     wait(cond,1);
>   #pragma omp single
>   {
>     signal(cond);
>   }
> }
> ```
I only see this for test cases involving tasks where we need to enforce a certain scheduling order. This is not needed here because we only want to test that one thread enters the single and the other one does not. We don't really care which one it is, do we?


https://reviews.llvm.org/D39853





More information about the Openmp-commits mailing list