From 375862b481d952add7510270dc0adaed04049b1b Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 14 Jun 2023 12:23:24 -0400 Subject: [PATCH] [OpenMP] Fix the issue in openmp/runtime/test/parallel/bug63197.c If the system has 32 threads, then the test will fail because of partial match. --- openmp/runtime/test/parallel/bug63197.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openmp/runtime/test/parallel/bug63197.c b/openmp/runtime/test/parallel/bug63197.c index bba21de..c60f400 100644 --- a/openmp/runtime/test/parallel/bug63197.c +++ b/openmp/runtime/test/parallel/bug63197.c @@ -4,14 +4,17 @@ #include int main(int argc, char *argv[]) { -#pragma omp parallel num_threads(3) if(0) +#pragma omp parallel num_threads(3) if (0) #pragma omp single { printf("BBB %2d\n", omp_get_num_threads()); } #pragma omp parallel #pragma omp single - { printf("CCC %2d\n", omp_get_num_threads()); } + { + if (omp_get_num_threads() != 3) + printf("PASS\n"); + } return 0; } -// CHECK-NOT: CCC 3 +// CHECK: PASS -- 2.7.4