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

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 9 11:47:04 PST 2017


protze.joachim added a comment.

Sections seems reasonable, for the single I would suggest to use the conditional.



================
Comment at: runtime/test/ompt/worksharing/single.c:12
   int x = 0;
   #pragma omp parallel num_threads(2)
   {
----------------
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);
  }
}
```


https://reviews.llvm.org/D39853





More information about the Openmp-commits mailing list