1 // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
4 /// GCC lowering of distribute results in calls to
5 /// omp_get_num_teams/omp_get_team_num rather than region calls
13 #pragma omp teams num_teams(4) thread_limit(1)
14 #pragma omp distribute dist_schedule(static, WORK_SIZE / 4)
15 for (i
= 0; i
< WORK_SIZE
; i
++) {}
20 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_work'
21 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_dispatch'
23 // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
25 // CHECK: {{^}}[[THREAD_ID0:[0-9]+]]: ompt_event_distribute_begin:
26 // CHECK-SAME: parallel_id=[[PARALLEL_ID0:[0-9]+]]
27 // CHECK-SAME: task_id=[[TASK_ID0:[0-9]+]]
28 // CHECK: {{^}}[[THREAD_ID0]]: ompt_event_distribute_chunk_begin:
29 // CHECK-SAME: parallel_id=[[PARALLEL_ID0]], task_id=[[TASK_ID0]]
30 // CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=16
32 // CHECK: {{^}}[[THREAD_ID1:[0-9]+]]: ompt_event_distribute_begin:
33 // CHECK-SAME: parallel_id=[[PARALLEL_ID1:[0-9]+]]
34 // CHECK-SAME: task_id=[[TASK_ID1:[0-9]+]]
35 // CHECK: {{^}}[[THREAD_ID1]]: ompt_event_distribute_chunk_begin:
36 // CHECK-SAME: parallel_id=[[PARALLEL_ID1]], task_id=[[TASK_ID1]]
37 // CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=16
39 // CHECK: {{^}}[[THREAD_ID2:[0-9]+]]: ompt_event_distribute_begin:
40 // CHECK-SAME: parallel_id=[[PARALLEL_ID2:[0-9]+]]
41 // CHECK-SAME: task_id=[[TASK_ID2:[0-9]+]]
42 // CHECK: {{^}}[[THREAD_ID2]]: ompt_event_distribute_chunk_begin:
43 // CHECK-SAME: parallel_id=[[PARALLEL_ID2]], task_id=[[TASK_ID2]]
44 // CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=16
46 // CHECK: {{^}}[[THREAD_ID3:[0-9]+]]: ompt_event_distribute_begin:
47 // CHECK-SAME: parallel_id=[[PARALLEL_ID3:[0-9]+]]
48 // CHECK-SAME: task_id=[[TASK_ID3:[0-9]+]]
49 // CHECK: {{^}}[[THREAD_ID3]]: ompt_event_distribute_chunk_begin:
50 // CHECK-SAME: parallel_id=[[PARALLEL_ID3]], task_id=[[TASK_ID3]]
51 // CHECK-SAME: chunk_start={{[0-9]+}}, chunk_iterations=16