gcc/libgomp/testsuite
Tobias Burnus 450b05ce54 libgomp: Use libnuma for OpenMP's partition=nearest allocation trait
As with the memkind library, it is only used when found at runtime;
it does not need to be present when building GCC.

The included testcase does not check whether the memory has been placed
on the nearest node as the Linux kernel memory handling too often ignores
that hint, using a different node for the allocation.  However, when
running with 'numactl --preferred=<node> ./executable', it is clearly
visible that the feature works by comparing malloc/default vs. nearest
placement (using get_mempolicy to obtain the node for a mem addr).

libgomp/ChangeLog:

	* allocator.c: Add ifdef for LIBGOMP_USE_LIBNUMA.
	(enum gomp_numa_memkind_kind): Renamed from gomp_memkind_kind;
	add GOMP_MEMKIND_LIBNUMA.
	(struct gomp_libnuma_data, gomp_init_libnuma, gomp_get_libnuma): New.
	(omp_init_allocator): Handle partition=nearest with libnuma if avail.
	(omp_aligned_alloc, omp_free, omp_aligned_calloc, omp_realloc): Add
	numa_alloc_local (+ memset), numa_free, and numa_realloc calls as
	needed.
	* config/linux/allocator.c (LIBGOMP_USE_LIBNUMA): Define
	* libgomp.texi: Fix a typo; use 'fi' instead of its ligature char.
	(Memory allocation): Renamed from 'Memory allocation with libmemkind';
	updated for libnuma usage.
	* testsuite/libgomp.c-c++-common/alloc-11.c: New test.
	* testsuite/libgomp.c-c++-common/alloc-12.c: New test.
2023-07-12 13:50:21 +02:00
..
config Support parallel testing in libgomp, part II [PR66005] 2023-05-15 12:11:18 +02:00
lib Support parallel testing in libgomp: fallback Perl 'flock' [PR66005] 2023-06-02 09:51:15 +02:00
libgomp.c Fix DejaGnu directive syntax error in 'libgomp.c/target-51.c' 2023-06-19 12:22:29 +02:00
libgomp.c++ OpenMP (C/C++): Keep pointer value of unmapped ptr with default mapping [PR110270] 2023-06-19 09:08:51 +02:00
libgomp.c-c++-common libgomp: Use libnuma for OpenMP's partition=nearest allocation trait 2023-07-12 13:50:21 +02:00
libgomp.fortran driver: Forward '-lgfortran', '-lm' to offloading compilation 2023-06-14 11:41:45 +02:00
libgomp.graphite libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884] 2023-05-15 12:11:17 +02:00
libgomp.oacc-c libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884] 2023-05-15 12:11:17 +02:00
libgomp.oacc-c++ libgomp testsuite: As appropriate, use the 'gcc', 'g++', 'gfortran' driver [PR91884] 2023-05-15 12:11:18 +02:00
libgomp.oacc-c-c++-common OpenMP: Cleanups related to the 'present' modifier 2023-06-12 18:15:28 +02:00
libgomp.oacc-fortran driver: Forward '-lgfortran', '-lm' to offloading compilation 2023-06-14 11:41:45 +02:00
flock Support parallel testing in libgomp: fallback Perl 'flock' [PR66005] 2023-06-02 09:51:15 +02:00
libgomp-site-extra.exp.in Support parallel testing in libgomp, part II [PR66005] 2023-05-15 12:11:18 +02:00
libgomp-test-support.exp.in libgomp nvptx plugin: Remove '--with-cuda-driver=[...]' etc. configuration option 2022-06-10 17:08:57 +02:00
Makefile.am Support parallel testing in libgomp, part II [PR66005] 2023-05-15 12:11:18 +02:00
Makefile.in Remove stale Autoconf checks for Perl 2023-06-02 09:51:14 +02:00