1 // RUN: %gdb-compile 2>&1 | tee %t.compile
2 // RUN: env OMP_SCHEDULE=guided,10 %gdb-run 2>&1 | tee %t.out | FileCheck %s
4 #include "../ompt_plugin.h"
10 printf("Application: Process %d started.\n", getpid());
13 omp_set_num_threads(3);
14 omp_set_max_active_levels(10);
16 #pragma omp parallel // parallel region begins
18 printf("outer parallel region Thread ID == %d\n", omp_get_thread_num());
19 /* Code for work to be done by outer parallel region threads over here. */
21 if (omp_get_thread_num() == 2)
24 #pragma omp parallel num_threads(2) // nested parallel region
26 /* Code for work to be done by inner parallel region threads over here. */
27 printf("inner parallel region thread id %d\n", omp_get_thread_num());
29 // if (omp_get_thread_num() == 1) sleep(1000);
31 #pragma omp parallel num_threads(2) //
35 for (i
= 0; i
< 20; i
++) {
36 // Some independent iterative computation to be done.
49 // CHECK-NOT: OMPT-OMPD mismatch
50 // CHECK-NOT: Python Exception
51 // CHECK-NOT: The program is not being run.