[Openmp-commits] [openmp] [OpenMP][AIX] lower max threads to reduce collapse testing time (PR #88319)

Xing Xue via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 10 13:53:11 PDT 2024


https://github.com/xingxue-ibm created https://github.com/llvm/llvm-project/pull/88319

The new collapse test cases define `MAX_THREADS` to be 256 in `collapse_test.inc`. This triples the testing time on an AIX machine that has 128 logical processors. This patch lowers `MAX_THREADS` to 64 for AIX to reduce the testing time.
`MAX_THREADS` is 256:
```
Slowest Tests:
--------------------------------------------------------------------------
971.92s: libomp :: worksharing/for/omp_collapse_many_LTLEGE_int.c
971.62s: libomp :: worksharing/for/omp_collapse_many_GTGEGT_int.c
965.29s: libomp :: worksharing/for/omp_collapse_many_GELTGT_int.c
332.97s: libomp :: tasking/omp_taskloop_num_tasks.c
233.26s: libomp :: worksharing/single/omp_single.c
207.42s: libomp :: tasking/omp_taskloop_grainsize.c
178.41s: libomp :: tasking/hidden_helper_task/depend.cpp
172.02s: libomp :: worksharing/for/omp_collapse_many_int.c
....
```
`MAX_THREADS` is 64:
```
Slowest Tests:
--------------------------------------------------------------------------
280.36s: libomp :: worksharing/for/omp_collapse_many_LTLEGE_int.c
267.77s: libomp :: worksharing/for/omp_collapse_many_GELTGT_int.c
267.46s: libomp :: worksharing/for/omp_collapse_many_GTGEGT_int.c
266.87s: libomp :: worksharing/single/omp_single.c
266.29s: libomp :: tasking/omp_taskloop_num_tasks.c
205.13s: libomp :: tasking/omp_taskloop_grainsize.c
183.47s: libomp :: threadprivate/omp_threadprivate.c
174.04s: libomp :: tasking/hidden_helper_task/depend.cpp
...
```

>From 6b3ff06e1597c661219f13641290f346064269b5 Mon Sep 17 00:00:00 2001
From: Xing Xue <xingxue at outlook.com>
Date: Wed, 10 Apr 2024 16:38:10 -0400
Subject: [PATCH] Use lower max threads to reduce the testing time.

---
 openmp/runtime/test/worksharing/for/collapse_test.inc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/openmp/runtime/test/worksharing/for/collapse_test.inc b/openmp/runtime/test/worksharing/for/collapse_test.inc
index de0e7e4e57f30d..37d80a56a68db1 100644
--- a/openmp/runtime/test/worksharing/for/collapse_test.inc
+++ b/openmp/runtime/test/worksharing/for/collapse_test.inc
@@ -15,7 +15,12 @@
 #define LOOP_TYPE2 LOOP_TYPES
 #define LOOP_STYPE2 LOOP_TYPES
 
+#if defined _AIX
+// Use lower max threads to reduce the testing time
+#define MAX_THREADS 64
+#else
 #define MAX_THREADS 256
+#endif
 
 #if defined VERBOSE
 #define PRINTF printf



More information about the Openmp-commits mailing list