From 35ee6305f14aef9dda778f26fb05ab33eb1616e7 Mon Sep 17 00:00:00 2001 From: Zane Fink Date: Thu, 12 Aug 2021 07:54:00 -0700 Subject: [PATCH] set dlopen flag --- charm4py/charm.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/charm4py/charm.py b/charm4py/charm.py index a328f0d8..c834b0c7 100644 --- a/charm4py/charm.py +++ b/charm4py/charm.py @@ -28,6 +28,7 @@ from . import reduction from . import wait import array +sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL) try: import numpy except ImportError: @@ -106,11 +107,11 @@ def __init__(self): self.options.interactive.verbose = 1 self.options.interactive.broadcast_imports = True - if 'OMPI_COMM_WORLD_SIZE' in os.environ: - # this is needed for OpenMPI, see: - # https://svn.open-mpi.org/trac/ompi/wiki/Linkers - import ctypes - self.__libmpi__ = ctypes.CDLL('libmpi.so', mode=ctypes.RTLD_GLOBAL) + #if 'OMPI_COMM_WORLD_SIZE' in os.environ: + # # this is needed for OpenMPI, see: + # # https://svn.open-mpi.org/trac/ompi/wiki/Linkers + # import ctypes + # self.__libmpi__ = ctypes.CDLL('libmpi.so', mode=ctypes.RTLD_GLOBAL) self.lib = load_charm_library(self) self.ReducerType = self.lib.ReducerType self.CkContributeToChare = self.lib.CkContributeToChare