LLVM OpenMP
20.0.0git
runtime
test
ompt
teams
distribute_dispatch.c
Go to the documentation of this file.
1
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
2
// REQUIRES: ompt
3
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
"
8
9
#define WORK_SIZE 64
10
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
++) {}
16
17
return
0;
18
}
19
20
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_work'
21
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_dispatch'
22
23
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
24
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
31
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
38
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
45
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
callback.h
WORK_SIZE
#define WORK_SIZE
GCC lowering of distribute results in calls to omp_get_num_teams/omp_get_team_num rather than region ...
Definition:
distribute_dispatch.c:9
main
int main()
Definition:
distribute_dispatch.c:11
i
#define i
Definition:
kmp_stub.cpp:87
Generated on Wed Jan 29 2025 20:58:01 for LLVM OpenMP by
1.9.6