[llvm] Stop including unordered_map (NFC)
[llvm-project.git] / openmp / runtime / test / ompt / teams / distribute_dispatch.c
blob3254a287236fd7d3e5a9425b31da635812d218dc
1 // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
2 // REQUIRES: ompt
4 /// GCC lowering of distribute results in calls to
5 /// omp_get_num_teams/omp_get_team_num rather than region calls
6 // UNSUPPORTED: gcc
7 #include "callback.h"
9 #define WORK_SIZE 64
11 int main() {
12 int i;
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++) {}
17 return 0;
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: parent_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: parent_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: parent_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: parent_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