1 // RUN: %libomp-compile-and-run
3 #include "omp_testsuite.h"
6 * Test if the compiler supports nested parallelism
7 * By Chunhua Liao, University of Houston
13 if (omp_get_max_threads() > 4)
14 omp_set_num_threads(4);
15 if (omp_get_max_threads() < 2)
16 omp_set_num_threads(2);
22 omp_set_max_active_levels(omp_get_supported_active_levels());
25 #pragma omp parallel shared(counter)
35 return (counter
!= 0);
43 for(i
= 0; i
< REPETITIONS
; i
++) {
44 if(!test_omp_nested()) {