[Openmp-commits] [PATCH] D107121: [OpenMP] Fix performance regression reported in bug #51235

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 4 00:46:45 PDT 2021

protze.joachim added a comment.

I think, I found the issue with the two tests:
On our system, the default env sets `OMP_NUM_THREADS=1`. When I set `OMP_NUM_THREADS=5` before running the tests, the tests succeed. I guess you should be able to reproduce the assertion by exporting `OMP_NUM_THREADS=1` before running the tests.
Since the tests do not specify explicit number of threads (using the `num_threads` clause or setting the env var), the team will run serially.

The taskwait synchronization fails in that case, because the last task has td_flags.team_serial set. I think, `td_incomplete_child_tasks` needs to be maintained for serialized teams, as soon as a hidden/detached task is created in a task. @AndreyChurbanov how should we handle the synchronization for such tasks?

For better test coverage, we should add two run lines to the tests, one setting `OMP_NUM_THREADS=1`, one setting `OMP_NUM_THREADS=5`.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list