[llvm] Stop including unordered_map (NFC)
[llvm-project.git] / openmp / runtime / test / ompt / tasks / taskloop_dispatch.c
blobd4ac609d0b3ed792e01a22fd29603150e53a0eb8
1 // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
2 // REQUIRES: ompt
3 // UNSUPPORTED: gnu, intel-16.0
5 #include "callback.h"
6 #include <omp.h>
8 int main() {
9 unsigned int i, x;
11 #pragma omp parallel num_threads(2)
13 #pragma omp barrier
15 #pragma omp master
16 #pragma omp taskloop grainsize(4)
17 for (i = 0; i < 16; i++) {
18 // Make every iteration takes at least 1ms
19 delay(1000);
22 // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
24 // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin:
25 // CHECK-SAME: parent_task_id={{[0-9]+}}
26 // CHECK-SAME: parallel_id=[[PARALLEL_ID:[0-9]+]]
27 // CHECK-SAME: requested_team_size=2
28 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin:
29 // CHECK-SAME: parallel_id=[[PARALLEL_ID]]
30 // CHECK-SAME: task_id=[[IMPLICIT_TASK_ID1:[0-9]+]]
31 // CHECK-SAME: team_size=2, thread_num=0
33 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_taskloop_begin:
34 // CHECK-SAME: parallel_id=[[PARALLEL_ID]]
35 // CHECK-SAME: parent_task_id=[[IMPLICIT_TASK_ID1]]
36 // CHECK-SAME: codeptr_ra=[[RETURN_ADDRESS:0x[0-f]+]], count=16
38 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create:
39 // CHECK-SAME: new_task_id=[[TASK_ID0:[0-9]+]]
40 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create:
41 // CHECK-SAME: new_task_id=[[TASK_ID1:[0-9]+]]
42 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create:
43 // CHECK-SAME: new_task_id=[[TASK_ID2:[0-9]+]]
44 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_task_create:
45 // CHECK-SAME: new_task_id=[[TASK_ID3:[0-9]+]]
47 // CHECK-DAG: {{.*}}: ompt_event_taskloop_chunk_begin:{{.*}}task_id=[[TASK_ID0]]{{.*}}chunk_iterations=4
48 // CHECK-DAG: {{.*}}: ompt_event_taskloop_chunk_begin:{{.*}}task_id=[[TASK_ID1]]{{.*}}chunk_iterations=4
49 // CHECK-DAG: {{.*}}: ompt_event_taskloop_chunk_begin:{{.*}}task_id=[[TASK_ID2]]{{.*}}chunk_iterations=4
50 // CHECK-DAG: {{.*}}: ompt_event_taskloop_chunk_begin:{{.*}}task_id=[[TASK_ID3]]{{.*}}chunk_iterations=4
52 return 0;