LLVM OpenMP
20.0.0git
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
c
d
e
g
h
i
m
n
p
r
s
t
u
Functions
c
d
e
g
i
m
n
p
r
s
u
Variables
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
_
a
b
c
d
e
i
k
l
m
n
o
p
r
t
u
Enumerations
_
b
c
d
f
k
l
n
o
s
t
Enumerator
_
a
b
c
d
e
f
k
l
n
o
p
r
s
t
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
runtime
test
ompt
misc
runtime_error.c
Go to the documentation of this file.
1
// RUN: %libomp-compile-and-run 2>&1 | sort | FileCheck %s
2
// REQUIRES: ompt
3
4
#include <string.h>
5
#include <stdio.h>
6
#include "
callback.h
"
7
8
// TODO: use error directive when compiler suppors
9
typedef
void
ident_t
;
10
extern
void
__kmpc_error
(
ident_t
*,
int
,
const
char
*);
11
12
int
main
() {
13
#pragma omp parallel num_threads(2)
14
{
15
if
(omp_get_thread_num() == 0) {
16
const
char
*msg =
"User message goes here"
;
17
printf(
"0: Message length=%"
PRIu64
"\n"
, (uint64_t)strlen(msg));
18
__kmpc_error
(NULL, ompt_warning, msg);
19
}
20
}
21
return
0;
22
}
23
24
// CHECK: {{^}}0: Message length=[[LENGTH:[0-9]+]]
25
// CHECK: {{^}}0: NULL_POINTER=[[NULL:.*$]]
26
27
// CHECK: {{^}}[[PRIMARY_ID:[0-9]+]]: ompt_event_implicit_task_begin
28
// CHECK: {{^}}[[PRIMARY_ID]]: ompt_event_runtime_error
29
// CHECK-SAME: severity=1
30
// CHECK-SAME: message=User message goes here
31
// CHECK-SAME: length=[[LENGTH]]
32
// CHECK-SAME: codeptr_ra={{0x[0-f]+}}
33
34
// Message from runtime
35
// CHECK: {{^}}OMP: Warning{{.*}}User message goes here
callback.h
__kmpc_error
void __kmpc_error(ident_t *, int, const char *)
Definition:
kmp_csupport.cpp:4532
ident_t
void ident_t
Definition:
runtime_error.c:9
main
int main()
Definition:
runtime_error.c:12
ident_t
Definition:
teams-no-par.c:23
Generated on Fri Jun 6 2025 23:29:17 for LLVM OpenMP by
1.9.6