[Openmp-commits] [PATCH] D159311: [OpenMP] [test] Fix target_thread_limit.cpp to not assume 4 or more cores

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Sep 1 07:27:05 PDT 2023


protze.joachim added inline comments.


================
Comment at: openmp/runtime/test/target/target_thread_limit.cpp:24
 // check whether thread_limit is honoured
 #pragma omp parallel
+    { count++; }
----------------
Fix the data race on count++


================
Comment at: openmp/runtime/test/target/target_thread_limit.cpp:74
 #pragma omp parallel
-    { printf("\nsecond target: parallel"); }
-    // OMP51: second target: parallel
-    // OMP51: second target: parallel
-    // OMP51: second target: parallel
-    // OMP51-NOT: second target: parallel
+    { count++; }
+    printf("\nsecond target: parallel: count = %d", count);
----------------
same here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159311



More information about the Openmp-commits mailing list