1 // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
2 // REQUIRES: ompt
3 #include "callback.h"
4 
5 #define WORK_SIZE 64
6 
main()7 int main() {
8   int i;
9 #pragma omp teams num_teams(4) thread_limit(1)
10 #pragma omp distribute dist_schedule(static, WORK_SIZE / 4)
11   for (i = 0; i < WORK_SIZE; i++) {}
12 
13   return 0;
14 }
15 
16 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_work'
17 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_dispatch'
18 
19 // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
20 
21 // CHECK: {{^}}[[THREAD_ID0:[0-9]+]]: ompt_event_distribute_begin:
22 // CHECK-SAME: parallel_id=[[PARALLEL_ID0:[0-9]+]]
23 // CHECK-SAME: parent_task_id=[[TASK_ID0:[0-9]+]]
24 // CHECK: {{^}}[[THREAD_ID0]]: ompt_event_distribute_chunk_begin:
25 // CHECK-SAME: parallel_id=[[PARALLEL_ID0]], task_id=[[TASK_ID0]]
26 // CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=16
27 
28 // CHECK: {{^}}[[THREAD_ID1:[0-9]+]]: ompt_event_distribute_begin:
29 // CHECK-SAME: parallel_id=[[PARALLEL_ID1:[0-9]+]]
30 // CHECK-SAME: parent_task_id=[[TASK_ID1:[0-9]+]]
31 // CHECK: {{^}}[[THREAD_ID1]]: ompt_event_distribute_chunk_begin:
32 // CHECK-SAME: parallel_id=[[PARALLEL_ID1]], task_id=[[TASK_ID1]]
33 // CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=16
34 
35 // CHECK: {{^}}[[THREAD_ID2:[0-9]+]]: ompt_event_distribute_begin:
36 // CHECK-SAME: parallel_id=[[PARALLEL_ID2:[0-9]+]]
37 // CHECK-SAME: parent_task_id=[[TASK_ID2:[0-9]+]]
38 // CHECK: {{^}}[[THREAD_ID2]]: ompt_event_distribute_chunk_begin:
39 // CHECK-SAME: parallel_id=[[PARALLEL_ID2]], task_id=[[TASK_ID2]]
40 // CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=16
41 
42 // CHECK: {{^}}[[THREAD_ID3:[0-9]+]]: ompt_event_distribute_begin:
43 // CHECK-SAME: parallel_id=[[PARALLEL_ID3:[0-9]+]]
44 // CHECK-SAME: parent_task_id=[[TASK_ID3:[0-9]+]]
45 // CHECK: {{^}}[[THREAD_ID3]]: ompt_event_distribute_chunk_begin:
46 // CHECK-SAME: parallel_id=[[PARALLEL_ID3]], task_id=[[TASK_ID3]]
47 // CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=16
48