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

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


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

Limit the number of threads to create in a test program because VE's pthread_create supports only 64 threads at a maximum.

>From 8000a7be18d85ca24081ecd07c76c25482eed22a Mon Sep 17 00:00:00 2001
From: "Kazushi (Jam) Marukawa" <marukawa at nec.com>
Date: Sat, 2 Sep 2023 02:39:09 +0200
Subject: [PATCH] [OpenMP][test][VE] Limit the number of threads to create

Limit the number of threads to create in a test program because VE's
pthread_create supports only 64 threads at a maximum.
---
 openmp/runtime/test/atomic/omp-atomic-compare-signedness.c | 5 +++++
 1 file changed, 5 insertions(+)

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>



More information about the Openmp-commits mailing list