[OpenMP][test][AIX] Make 64 the max number of threads for capacity tests in AIX 32-bit (#88739)
This patch makes 64 the max number of threads for 2 capacity tests in AIX 32-bit mode rather than `XFAIL`ing them.
This commit is contained in:
parent
454d449697
commit
22bba85d82
@ -1,7 +1,4 @@
|
||||
// RUN: %libomp-cxx-compile-and-run
|
||||
//
|
||||
// AIX runs out of resource in 32-bit with 4*omp_get_max_threads() threads.
|
||||
// XFAIL: aix && ppc
|
||||
|
||||
#include <omp.h>
|
||||
|
||||
@ -11,6 +8,12 @@
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
// AIX runs out of resource in 32-bit if 4*omp_get_max_threads() is more
|
||||
// than 64 threads with the default stack size.
|
||||
#if defined(_AIX) && !__LP64__
|
||||
#define MAX_THREADS 64
|
||||
#endif
|
||||
|
||||
void dummy_root() {
|
||||
// omp_get_max_threads() will do middle initialization
|
||||
int nthreads = omp_get_max_threads();
|
||||
@ -18,9 +21,14 @@ void dummy_root() {
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
const int N = std::min(std::max(std::max(32, 4 * omp_get_max_threads()),
|
||||
4 * omp_get_num_procs()),
|
||||
std::numeric_limits<int>::max());
|
||||
int N = std::min(std::max(std::max(32, 4 * omp_get_max_threads()),
|
||||
4 * omp_get_num_procs()),
|
||||
std::numeric_limits<int>::max());
|
||||
|
||||
#if defined(_AIX) && !__LP64__
|
||||
if (N > MAX_THREADS)
|
||||
N = MAX_THREADS;
|
||||
#endif
|
||||
|
||||
std::vector<int> data(N);
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
// RUN: %libomp-cxx-compile-and-run
|
||||
//
|
||||
// AIX runs out of resource in 32-bit with 4*omp_get_max_threads() threads.
|
||||
// XFAIL: aix && ppc
|
||||
|
||||
#include <omp.h>
|
||||
|
||||
@ -10,10 +7,21 @@
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
// AIX runs out of resource in 32-bit if 4*omp_get_max_threads() is more
|
||||
// than 64 threads with the default stacksize.
|
||||
#if defined(_AIX) && !__LP64__
|
||||
#define MAX_THREADS 64
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
const int N = std::min(std::max(std::max(32, 4 * omp_get_max_threads()),
|
||||
4 * omp_get_num_procs()),
|
||||
std::numeric_limits<int>::max());
|
||||
int N = std::min(std::max(std::max(32, 4 * omp_get_max_threads()),
|
||||
4 * omp_get_num_procs()),
|
||||
std::numeric_limits<int>::max());
|
||||
|
||||
#if defined(_AIX) && !__LP64__
|
||||
if (N > MAX_THREADS)
|
||||
N = MAX_THREADS;
|
||||
#endif
|
||||
|
||||
std::vector<int> data(N);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user