[Openmp-commits] [PATCH] D122107: [OpenMP] Add support for ompt_callback_dispatch

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 29 22:31:10 PDT 2022


protze.joachim added inline comments.


================
Comment at: openmp/runtime/test/ompt/worksharing/for/loop_dispatch.c:11-29
+  int i;
+
+#pragma omp parallel num_threads(4)
+  {
+#pragma omp for schedule(static, WORK_SIZE / 4)
+    for (i = 0; i < WORK_SIZE; i++) {}
+
----------------
@hbae because of dynamic schedule it is possible that some thread gets no iteration. I'm not sure how the runtime behaves in such case. 

I think we should replace the delay by signal-wait code similar to the tasking tests to make sure that all threads get at least one iteration. 

Although nthreads should be 4 most of the time, with limited resources, the runtime might use less threads. In that case we should not deadlock - the test will fail nevertheless.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122107/new/

https://reviews.llvm.org/D122107



More information about the Openmp-commits mailing list