[Openmp-commits] [PATCH] D49996: [OpenMP] Fix tasking + parallel bug

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 30 12:14:13 PDT 2018


AndreyChurbanov added a comment.

In https://reviews.llvm.org/D49996#1180711, @Hahnfeld wrote:

> This doesn't seem to work with GOMP interface. I think the initialization should be moved to `__kmp_task_alloc` (or `__kmp_omp_task`, is there a reason this has to happen when allocating?)?


Yes, should be fine to move it to __kmp_task_alloc.  An alternative would be to change middle initialization to initialize nproc not only for current task, but for all its parents, that looks a bit trickier to write at first glance...

Regarding __kmp_omp_task - this looks worse, because it may be skipped. E.g. Intel compiler can skip it for "task if(0)".  So the allocation routine looks preferable.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D49996





More information about the Openmp-commits mailing list