[Openmp-commits] [openmp] [openmp] Fix bug63197.c test with 3 cores (PR #183269)

via Openmp-commits openmp-commits at lists.llvm.org
Wed Feb 25 09:06:26 PST 2026


================
@@ -4,14 +4,15 @@
 #include <stdio.h>
 
 int main(int argc, char *argv[]) {
-#pragma omp parallel num_threads(3) if (0)
+  unsigned N = omp_get_max_threads() - 1;
+#pragma omp parallel num_threads(N) if (0)
----------------
jprotze wrote:

This change doesn't really make sense. With if(0), the expectation is that a single-threaded team is spawned. The output of the printf is never evaluated.

https://github.com/llvm/llvm-project/pull/183269


More information about the Openmp-commits mailing list