libgomp: Fix allocator handling for Linux when libnuma is not available
Follow up to r14-2462-g450b05ce54d3f0. The case that libnuma was not available at runtime was not properly handled; now it falls back to the normal malloc. libgomp/ * allocator.c (omp_init_allocator): Check whether symbol from dlopened libnuma is available before using libnuma for allocations.
This commit is contained in:
parent
ad0518d97c
commit
407d68daed
1 changed files with 2 additions and 1 deletions
|
@ -377,8 +377,9 @@ omp_init_allocator (omp_memspace_handle_t memspace, int ntraits,
|
|||
#ifdef LIBGOMP_USE_LIBNUMA
|
||||
if (data.memkind == GOMP_MEMKIND_NONE && data.partition == omp_atv_nearest)
|
||||
{
|
||||
data.memkind = GOMP_MEMKIND_LIBNUMA;
|
||||
libnuma_data = gomp_get_libnuma ();
|
||||
if (libnuma_data->numa_alloc_local != NULL)
|
||||
data.memkind = GOMP_MEMKIND_LIBNUMA;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue