1 // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
2 // REQUIRES: ompt, multicpu
4 // Compilation fails for icc
9 #pragma omp target teams num_teams(1) thread_limit(2)
10 #pragma omp parallel num_threads(2)
11 { printf("In teams\n"); }
15 // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
17 // CHECK-NOT: 0: parallel_data initially not null
18 // CHECK-NOT: 0: task_data initially not null
19 // CHECK-NOT: 0: thread_data initially not null
21 // CHECK: {{^}}[[MASTER:[0-9]+]]: ompt_event_initial_task_begin:
22 // CHECK-SAME: task_id=[[INIT_TASK:[0-9]+]], {{.*}}, index=1
24 // CHECK: {{^}}[[MASTER]]: ompt_event_teams_begin:
25 // CHECK-SAME: parent_task_id=[[INIT_TASK]]
26 // CHECK-SAME: {{.*}} requested_num_teams=1
27 // CHECK-SAME: {{.*}} invoker=[[TEAMS_FLAGS:[0-9]+]]
32 // initial task in the teams construct
33 // CHECK: {{^}}[[MASTER]]: ompt_event_initial_task_begin:
34 // CHECK-SAME: task_id=[[INIT_TASK_0:[0-9]+]], actual_parallelism=1, index=0
36 // parallel region forked by runtime
37 // CHECK: {{^}}[[MASTER]]: ompt_event_parallel_begin:
38 // CHECK-SAME: {{.*}} parent_task_id=[[INIT_TASK_0]]
39 // CHECK-SAME: {{.*}} parallel_id=[[PAR_0:[0-9]+]]
40 // CHECK: {{^}}[[MASTER]]: ompt_event_implicit_task_begin:
41 // CHECK-SAME: {{.*}} parallel_id=[[PAR_0]], task_id=[[IMPL_TASK_0:[0-9]+]]
43 // user parallel region
44 // CHECK: {{^}}[[MASTER]]: ompt_event_parallel_begin:
45 // CHECK-SAME: {{.*}} parent_task_id=[[IMPL_TASK_0]]
46 // CHECK-SAME: {{.*}} parallel_id=[[PAR_00:[0-9]+]]
47 // CHECK-SAME: {{.*}} requested_team_size=2
48 // CHECK: {{^}}[[MASTER]]: ompt_event_implicit_task_begin:
49 // CHECK-SAME: {{.*}} parallel_id=[[PAR_00]], task_id=[[IMPL_TASK_00:[0-9]+]]
50 // CHECK-SAME: {{.*}} team_size=2, thread_num=0
52 // barrier event is here
54 // CHECK: {{^}}[[MASTER]]: ompt_event_implicit_task_end:
55 // CHECK-SAME: {{.*}} parallel_id={{[0-9]+}}, task_id=[[IMPL_TASK_00]]
56 // CHECK: {{^}}[[MASTER]]: ompt_event_parallel_end:
57 // CHECK-SAME: {{.*}} parallel_id=[[PAR_00]], task_id=[[IMPL_TASK_0]]
59 // CHECK: {{^}}[[MASTER]]: ompt_event_implicit_task_end:
60 // CHECK-SAME: {{.*}} parallel_id={{[0-9]+}}, task_id=[[IMPL_TASK_0]]
61 // CHECK: {{^}}[[MASTER]]: ompt_event_parallel_end:
62 // CHECK-SAME: {{.*}} parallel_id=[[PAR_0]], task_id=[[INIT_TASK_0]]
64 // CHECK: {{^}}[[MASTER]]: ompt_event_initial_task_end:
65 // CHECK-SAME: task_id=[[INIT_TASK_0]], actual_parallelism=0, index=0
67 // CHECK: {{^}}[[MASTER]]: ompt_event_teams_end:
68 // CHECK-SAME: {{.*}} task_id=[[INIT_TASK]], invoker=[[TEAMS_FLAGS]]
70 // CHECK: {{^}}[[MASTER]]: ompt_event_initial_task_end:
71 // CHECK-SAME: task_id=[[INIT_TASK]], {{.*}}, index=1
76 // CHECK: {{^}}[[WORKER:[0-9]+]]: ompt_event_implicit_task_begin:
77 // CHECK-SAME: {{.*}} parallel_id=[[PAR_00]], task_id=[[IMPL_TASK_01:[0-9]+]]
78 // CHECK-SAME: {{.*}} team_size=2, thread_num=1
80 // barrier event is here
82 // CHECK: {{^}}[[WORKER]]: ompt_event_implicit_task_end:
83 // CHECK-SAME: {{.*}} parallel_id={{[0-9]+}}, task_id=[[IMPL_TASK_01]]