[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / openmp / libompd / test / openmp_examples / ompd_icvs.c
blobde1c25c067d672789ac354e4b0af89c7bee2315a
1 // RUN: %gdb-compile 2>&1 | tee %t.compile
2 // RUN: env OMP_SCHEDULE=dynamic,2 %gdb-test -x %S/ompd_icvs.cmd %t 2>&1 | tee
3 // %t.out | FileCheck %s
5 #include <omp.h>
6 #include <stdio.h>
7 int main(void) {
8 omp_set_max_active_levels(3);
9 omp_set_dynamic(0);
10 omp_set_num_threads(9);
11 #pragma omp parallel
13 omp_set_num_threads(5);
14 #pragma omp parallel
16 #pragma omp single
17 { printf("Inner: num_thds=%d\n", omp_get_num_threads()); }
19 #pragma omp barrier
20 omp_set_max_active_levels(0);
21 #pragma omp parallel
23 #pragma omp single
24 { printf("Inner: num_thds=%d\n", omp_get_num_threads()); }
26 #pragma omp barrier
27 #pragma omp single
28 { printf("Outer: num_thds=%d\n", omp_get_num_threads()); }
30 return 0;
32 // CHECK: Loaded OMPD lib successfully!
34 // CHECK: run-sched-var task dynamic,2
35 // CHECK: levels-var parallel 2
36 // CHECK: active-levels-var parallel 2
37 // CHECK: team-size-var parallel 5
39 // CHECK: levels-var parallel 2
40 // CHECK: active-levels-var parallel 1
41 // CHECK: team-size-var parallel 1
43 // CHECK: levels-var parallel 1
44 // CHECK: active-levels-var parallel 1
45 // CHECK: team-size-var parallel 9
47 // CHECK-NOT: Python Exception
48 // CHECK-NOT: The program is not being run.
49 // CHECK-NOT: No such file or directory