LLVM OpenMP
runtime
test
env
omp_num_threads_dev_invalid.c
Go to the documentation of this file.
1
// RUN: %libomp-compile
2
// RUN: env KMP_WARNINGS=1 OMP_NUM_THREADS_DEV_abc=10 OMP_NUM_THREADS_ALL=4 \
3
// RUN: %libomp-run 2>&1 | FileCheck %s
4
//
5
// Malformed `_DEV_<token>` is rejected with a warning, and a sibling
6
// valid `_ALL` setting is unaffected.
7
8
#include <omp.h>
9
#include <stdio.h>
10
11
int
main
(
void
) {
12
int
max =
omp_get_max_threads
();
13
if
(max != 4) {
14
fprintf(stderr,
"FAIL: omp_get_max_threads()=%d, expected 4\n"
, max);
15
return
1;
16
}
17
printf(
"DONE\n"
);
18
return
0;
19
}
20
21
// CHECK: {{^OMP: Warning #[0-9]+:.*OMP_NUM_THREADS_DEV_abc.*}}
22
// CHECK: DONE
main
int main(void)
Definition
omp_num_threads_dev_invalid.c:11
omp_get_max_threads
int omp_get_max_threads()
Generated on
for LLVM OpenMP by
1.14.0