LLVM OpenMP
omp_default_device_all_rejected.c
Go to the documentation of this file.
1// RUN: %libomp-compile
2// RUN: env KMP_WARNINGS=1 OMP_DEFAULT_DEVICE_ALL=2 %libomp-run 2>&1 \
3// RUN: | FileCheck %s
4//
5// Suffix on global-scope base must be rejected with a warning AND not
6// reach the ICV.
7
8#include <omp.h>
9#include <stdio.h>
10
11int main(void) {
13 int dd = omp_get_default_device();
14 if (dd == 2) {
15 fprintf(stderr, "FAIL: OMP_DEFAULT_DEVICE_ALL=2 was applied; got %d\n", dd);
16 return 1;
17 }
18 printf("DONE\n");
19 return 0;
20}
21
22// CHECK: {{^OMP: Warning #[0-9]+:.*OMP_DEFAULT_DEVICE_ALL.*}}
23// CHECK: DONE
void
Definition ittnotify.h:3324
int omp_get_max_threads()