LLVM OpenMP
runtime
test
env
omp_num_threads_warnings_off.c
Go to the documentation of this file.
1
// RUN: %libomp-compile
2
// RUN: env KMP_WARNINGS=0 OMP_NUM_THREADS_DEV_abc=10 \
3
// RUN: OMP_DEFAULT_DEVICE_ALL=2 OMP_NUM_THREADS_ALL=8 \
4
// RUN: %libomp-run 2>&1 | FileCheck %s
5
//
6
// KMP_WARNINGS=0 silences device-scope warnings; OMP_NUM_THREADS_ALL=8 applies.
7
8
#include <omp.h>
9
#include <stdio.h>
10
11
int
main
(
void
) {
12
int
max =
omp_get_max_threads
();
13
if
(max != 8) {
14
fprintf(stderr,
"FAIL: omp_get_max_threads()=%d, expected 8\n"
, max);
15
return
1;
16
}
17
printf(
"DONE\n"
);
18
return
0;
19
}
20
21
// CHECK-NOT: {{^OMP: Warning #[0-9]+:.*OMP_NUM_THREADS_DEV_abc.*}}
22
// CHECK-NOT: {{^OMP: Warning #[0-9]+:.*OMP_DEFAULT_DEVICE_ALL.*}}
23
// CHECK: DONE
main
int main(void)
Definition
omp_num_threads_warnings_off.c:11
omp_get_max_threads
int omp_get_max_threads()
Generated on
for LLVM OpenMP by
1.14.0