LLVM OpenMP
22.0.0git
runtime
test
ompt
worksharing
taskinfo
sections_serialized.c
Go to the documentation of this file.
1
// clang-format off
2
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
3
// REQUIRES: ompt
4
// clang-format on
5
6
#include "
callback.h
"
7
#include <omp.h>
8
9
int
main
() {
10
#pragma omp parallel sections num_threads(1)
11
{
12
#pragma omp section
13
{
14
// implicit task info
15
print_ids
(0);
16
// initial task info
17
print_ids
(1);
18
}
19
}
20
21
// clang-format off
22
// Check if libomp supports the callbacks for this test.
23
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_task_create'
24
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_implicit_task'
25
26
27
// CHECK: {{^}}0: NULL_POINTER=[[NULL:.*$]]
28
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_initial_task_begin: parallel_id=[[INITIAL_PARALLEL_ID:[0-f]+]], task_id=[[INITIAL_TASK_ID:[0-f]+]], actual_parallelism=1, index=1, flags=1
29
30
// region 0
31
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin
32
// CHECK-SAME: parent_task_frame.exit=[[NULL]], parent_task_frame.reenter=[[INITIAL_TASK_FRAME_ENTER:(0x)?[0-f]+]],
33
// CHECK-SAME: parallel_id=[[PARALLEL_ID:[0-f]+]]
34
35
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID:[0-f]+]]
36
37
// information about implicit task (exit frame should be set, while enter should be NULL)
38
// CHECK: {{^}}[[MASTER_ID]]: task level 0: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]]
39
// CHECK-SAME: exit_frame={{(0x)?[0-f]+}}
40
// CHECK-SAME: reenter_frame=[[NULL]]
41
// CHECK-SAME: task_type=ompt_task_implicit
42
43
// information about initial task (exit frame should be NULL, while enter frame shoule be set)
44
// CHECK: {{^}}[[MASTER_ID]]: task level 1: parallel_id=[[INITIAL_PARALLEL_ID]], task_id=[[INITIAL_TASK_ID]]
45
// CHECK-SAME: exit_frame=[[NULL]]
46
// CHECK-SAME: reenter_frame=[[INITIAL_TASK_FRAME_ENTER]]
47
// CHECK-SAME: task_type=ompt_task_initial
48
// clang-format on
49
50
return
0;
51
}
callback.h
print_ids
static void print_ids(int level)
Definition
callback.h:187
main
int main()
Definition
sections_serialized.c:9
Generated on
for LLVM OpenMP by
1.14.0