[Openmp-commits] [openmp] [OpenMP][test][VE] Limit the number of threads to create (PR #65873)

via Openmp-commits openmp-commits at lists.llvm.org
Sat Sep 9 20:43:51 PDT 2023


llvmbot wrote:

@llvm/pr-subscribers-openmp

<details>
<summary>Changes</summary>

Limit the number of threads to create in a test program because VE's pthread_create supports only 64 threads at a maximum.
--
Full diff: https://github.com/llvm/llvm-project/pull/65873.diff

1 Files Affected:

- (modified) openmp/runtime/test/atomic/omp-atomic-compare-signedness.c (+5) 


<pre>
diff --git a/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c b/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c
index 41c0d5617a7704c..ca37d717a7f8918 100644
--- a/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c
+++ b/openmp/runtime/test/atomic/omp-atomic-compare-signedness.c
@@ -11,7 +11,12 @@
 // UNSUPPORTED: gcc
 
 // High parallelism increases our chances of detecting a lack of atomicity.
+#ifdef __ve__
+// VE's pthread_create supports 64 threads at a maximum.
+#define NUM_THREADS_TRY 64
+#else
 #define NUM_THREADS_TRY 256
+#endif
 
 #include <limits.h>
 #include <omp.h>
</pre>

</details>

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


More information about the Openmp-commits mailing list