LLVM OpenMP
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
11int 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
int main(void)
int omp_get_max_threads()