[Openmp-commits] [PATCH] D126579: [OpenMP][libomp] do not try to dlopen libmemkind on macOS
Daniel (Doug) Douglas via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri May 27 16:37:43 PDT 2022
danieljdouglas-deco created this revision.
danieljdouglas-deco added reviewers: jlpeyton, hbae.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
danieljdouglas-deco requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
libmemkind is only available for linux
calling dlopen here can also be problematic in a client app that fork'ed
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126579
Files:
openmp/runtime/src/kmp_alloc.cpp
Index: openmp/runtime/src/kmp_alloc.cpp
===================================================================
--- openmp/runtime/src/kmp_alloc.cpp
+++ openmp/runtime/src/kmp_alloc.cpp
@@ -1257,7 +1257,7 @@
MA == llvm_omp_target_shared_mem_alloc || \
MA == llvm_omp_target_device_mem_alloc)
-#if KMP_OS_UNIX && KMP_DYNAMIC_LIB
+#if KMP_OS_UNIX && KMP_DYNAMIC_LIB && !KMP_OS_DARWIN
static inline void chk_kind(void ***pkind) {
KMP_DEBUG_ASSERT(pkind);
if (*pkind) // symbol found
@@ -1268,7 +1268,7 @@
void __kmp_init_memkind() {
// as of 2018-07-31 memkind does not support Windows*, exclude it for now
-#if KMP_OS_UNIX && KMP_DYNAMIC_LIB
+#if KMP_OS_UNIX && KMP_DYNAMIC_LIB && !KMP_OS_DARWIN
// use of statically linked memkind is problematic, as it depends on libnuma
kmp_mk_lib_name = "libmemkind.so";
h_memkind = dlopen(kmp_mk_lib_name, RTLD_LAZY);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126579.432665.patch
Type: text/x-patch
Size: 914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220527/cd597d71/attachment.bin>
More information about the Openmp-commits
mailing list