1 | // RUN: %libomp-compile-and-run | FileCheck %s |
2 | // REQUIRES: ompt |
3 | // UNSUPPORTED: gcc |
4 | // Compilation fails for icc |
5 | // XFAIL: icc |
6 | #include "callback.h" |
7 | |
8 | int main() { |
9 | #pragma omp target teams num_teams(1) thread_limit(1) |
10 | { printf("In teams\n" ); } |
11 | return 0; |
12 | } |
13 | |
14 | // CHECK: 0: NULL_POINTER=[[NULL:.*$]] |
15 | |
16 | // CHECK-NOT: 0: parallel_data initially not null |
17 | // CHECK-NOT: 0: task_data initially not null |
18 | // CHECK-NOT: 0: thread_data initially not null |
19 | |
20 | // CHECK: {{^}}[[MASTER:[0-9]+]]: ompt_event_initial_task_begin: |
21 | // CHECK-SAME: task_id=[[INIT_TASK:[0-9]+]], {{.*}}, index=1 |
22 | |
23 | // CHECK: {{^}}[[MASTER]]: ompt_event_teams_begin: |
24 | // CHECK-SAME: parent_task_id=[[INIT_TASK]] |
25 | // CHECK-SAME: {{.*}} requested_num_teams=1 |
26 | // CHECK-SAME: {{.*}} invoker=[[TEAMS_FLAGS:[0-9]+]] |
27 | |
28 | // initial task in the teams construct starts |
29 | // CHECK: {{^}}[[MASTER]]: ompt_event_initial_task_begin: |
30 | // CHECK-SAME: task_id=[[INIT_TASK_0:[0-9]+]], actual_parallelism=1, index=0 |
31 | |
32 | // parallel region forked by runtime |
33 | // CHECK: {{^}}[[MASTER]]: ompt_event_parallel_begin: |
34 | // CHECK-SAME: {{.*}} parent_task_id=[[INIT_TASK_0]] |
35 | // CHECK-SAME: {{.*}} parallel_id=[[PAR_0:[0-9]+]] |
36 | // CHECK: {{^}}[[MASTER]]: ompt_event_implicit_task_begin: |
37 | // CHECK-SAME: {{.*}} parallel_id=[[PAR_0]], task_id=[[IMPL_TASK_0:[0-9]+]] |
38 | // CHECK: {{^}}[[MASTER]]: ompt_event_implicit_task_end: |
39 | // CHECK-SAME: {{.*}} parallel_id={{[0-9]+}}, task_id=[[IMPL_TASK_0]] |
40 | // CHECK: {{^}}[[MASTER]]: ompt_event_parallel_end: |
41 | // CHECK-SAME: {{.*}} parallel_id=[[PAR_0]], task_id=[[INIT_TASK_0]] |
42 | |
43 | // initial task in the teams construct ends |
44 | // CHECK: {{^}}[[MASTER]]: ompt_event_initial_task_end: |
45 | // CHECK-SAME: task_id=[[INIT_TASK_0]], actual_parallelism=0, index=0 |
46 | |
47 | // CHECK: {{^}}[[MASTER]]: ompt_event_teams_end: |
48 | // CHECK-SAME: {{.*}} task_id=[[INIT_TASK]], invoker=[[TEAMS_FLAGS]] |
49 | |
50 | // CHECK: {{^}}[[MASTER]]: ompt_event_initial_task_end: |
51 | // CHECK-SAME: task_id=[[INIT_TASK]], {{.*}}, index=1 |
52 | |