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
tasking
hidden_helper_task
issue-87117.c
Go to the documentation of this file.
1
// RUN: %libomp-compile
2
// RUN: env KMP_HOT_TEAMS_MODE=0 KMP_HOT_TEAMS_MAX_LEVEL=1 %libomp-run
3
//
4
// Force the defaults of:
5
// KMP_HOT_TEAMS_MODE=0 means free extra threads after parallel
6
// involving non-hot team
7
// KMP_HOT_TEAMS_MAX_LEVEL=1 means only the initial outer team
8
// is a hot team.
9
10
#include <stdio.h>
11
#include <stdlib.h>
12
#include <omp.h>
13
14
int
main
() {
15
int
a
;
16
omp_set_max_active_levels
(2);
17
// This nested parallel creates extra threads on the thread pool
18
#pragma omp parallel num_threads(2)
19
{
20
#pragma omp parallel num_threads(2)
21
{
22
#pragma omp atomic
23
a
++;
24
}
25
}
26
27
// Causes assert if hidden helper thread tries to allocate from thread pool
28
// instead of creating new OS threads
29
#pragma omp parallel num_threads(1)
30
{
31
#pragma omp target nowait
32
{
a
++; }
33
}
34
35
return
EXIT_SUCCESS;
36
}
main
int main()
Definition:
issue-87117.c:14
omp_set_max_active_levels
#define omp_set_max_active_levels
Definition:
kmp_stub.cpp:29
a
int a
Definition:
llvm-issue-80664.c:20
Generated on Sun Jun 15 2025 06:09:33 for LLVM OpenMP by
1.9.6