Skip to content

Commit 0aa892b

Browse files
Support Spectrum MPI (#233)
1 parent 4c414b7 commit 0aa892b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

charm4py/charm.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ def __init__(self):
110110
# this is needed for OpenMPI, see:
111111
# https://svn.open-mpi.org/trac/ompi/wiki/Linkers
112112
import ctypes
113-
self.__libmpi__ = ctypes.CDLL('libmpi.so', mode=ctypes.RTLD_GLOBAL)
113+
try:
114+
self.__libmpi__ = ctypes.CDLL('libmpi.so', mode=ctypes.RTLD_GLOBAL)
115+
except OSError:
116+
# For IBM's Spectrum MPI, which is based on Open MPI, but renames the library
117+
self.__libmpi__ = ctypes.CDLL('libmpi_ibm.so', mode=ctypes.RTLD_GLOBAL)
118+
114119
self.lib = load_charm_library(self)
115120
self.ReducerType = self.lib.ReducerType
116121
self.CkContributeToChare = self.lib.CkContributeToChare

0 commit comments

Comments
 (0)