diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-10-15 12:16:50 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-10-15 12:16:50 +0200 |
commit | e7ce32c783c8d38ef8a1ab227fd05cbab41da75b (patch) | |
tree | 574280be16a3a47f6e06e653f26c4f185085e7ad /libgomp/testsuite/libgomp.c | |
parent | 5809be05a2813f2a95d9787f388185fa31fbf3a2 (diff) | |
download | gcc-e7ce32c783c8d38ef8a1ab227fd05cbab41da75b.zip gcc-e7ce32c783c8d38ef8a1ab227fd05cbab41da75b.tar.gz gcc-e7ce32c783c8d38ef8a1ab227fd05cbab41da75b.tar.bz2 |
openmp: Add support for OMP_PLACES=numa_domains
This adds support for numa_domains abstract name in OMP_PLACES, also new
in OpenMP 5.1.
Way to test this is
OMP_PLACES=numa_domains OMP_DISPLAY_ENV=true LD_PRELOAD=.libs/libgomp.so.1 /bin/true
and see what it prints on OMP_PLACES line.
For non-NUMA machines it should print a single place that covers all CPUs,
for NUMA machine one place for each NUMA node with corresponding CPUs.
2021-10-15 Jakub Jelinek <jakub@redhat.com>
* env.c (parse_places_var): Handle numa_domains as level 5.
* config/linux/affinity.c (gomp_affinity_init_numa_domains): New
function.
(gomp_affinity_init_level): Use it instead of
gomp_affinity_init_level_1 for level == 5.
* testsuite/libgomp.c/places-5.c: New test.
Diffstat (limited to 'libgomp/testsuite/libgomp.c')
-rw-r--r-- | libgomp/testsuite/libgomp.c/places-5.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/places-5.c b/libgomp/testsuite/libgomp.c/places-5.c new file mode 100644 index 0000000..5f1e595 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/places-5.c @@ -0,0 +1,10 @@ +/* { dg-set-target-env-var OMP_PLACES "numa_domains" } */ + +#include <omp.h> + +int +main () +{ + omp_display_env (0); + return 0; +} |