[clang][Driver] Support simplified triple versions for config files (#111387)
[llvm-project.git] / openmp / runtime / test / ompt / synchronization / taskwait.c
blobc4310246b7ea1f6a39e33a05c2fdc4db6463e030
1 // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
2 // REQUIRES: ompt
3 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
4 #include "callback.h"
5 #include <omp.h>
7 int main()
9 int x = 0;
10 #pragma omp parallel num_threads(2)
12 #pragma omp master
14 #pragma omp task
16 x++;
18 #pragma omp taskwait
19 print_current_address(1);
23 // Check if libomp supports the callbacks for this test.
24 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_sync_region'
25 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_sync_region_wait'
27 // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
29 // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_taskwait_begin: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]]
30 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskwait_begin: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS]]
31 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskwait_end: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS]]
32 // CHECK-NEXT: {{^}}[[MASTER_ID]]: ompt_event_taskwait_end: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra=[[RETURN_ADDRESS]]
33 // CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]
35 return 0;