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