Files
clang-p2996/openmp/runtime/test/affinity/format/proc_bind.c
Jonathan Peyton 1234011b80 [OpenMP][libomp] Introduce oneAPI compiler support
Introduce KMP_COMPILER_ICX macro to represent compilation with oneAPI
compiler.

Fixup flag detection and compiler ID detection in CMake. Older CMake's
detect IntelLLVM as Clang.

Fix compiler warnings.

Fixup many of the tests to have non-empty parallel regions as they are
elided by oneAPI compiler.
2022-02-14 14:10:33 -06:00

27 lines
820 B
C

// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES='{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0}' %libomp-run | %python %S/check.py -c 'CHECK' %s
// REQUIRES: affinity
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include "omp_testsuite.h"
int main(int argc, char** argv) {
omp_set_affinity_format("TESTER: tl:%L tn:%n nt:%N aff:{%A}");
omp_set_num_threads(8);
// Initial parallel
go_parallel_spread();
go_parallel_spread();
// Affinity changes here
go_parallel_close();
go_parallel_close();
// Affinity changes here
go_parallel_master();
go_parallel_master();
return get_exit_value();
}
// CHECK: num_threads=8 TESTER: tl:1 tn:[0-7] nt:8 aff:
// CHECK: num_threads=8 TESTER: tl:1 tn:[0-7] nt:8 aff:
// CHECK: num_threads=8 TESTER: tl:1 tn:[0-7] nt:8 aff: