From b8b93d7ab8873d50d70d81f652159a73f2fd73fd Mon Sep 17 00:00:00 2001 From: Mark Hillebrand Date: Thu, 3 Nov 2016 17:04:37 +0100 Subject: [PATCH] bindings/python/cntk/distributed.py: dynamic load for libmpi.so.12, same as CNTK binary links against --- bindings/python/cntk/distributed.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/python/cntk/distributed.py b/bindings/python/cntk/distributed.py index df1b657ecacb..5b21bd22b60e 100644 --- a/bindings/python/cntk/distributed.py +++ b/bindings/python/cntk/distributed.py @@ -7,13 +7,13 @@ from . import trainer from .utils import typemap -# Preload libmpi.so for non-Windows platform to work around MPI_Init failure bug +# Preload libmpi.so.12 for non-Windows platform to work around MPI_Init failure bug # https://xrunhprof.wordpress.com/2014/11/04/an-openmpi-python-and-dlopen-issue/ # If other OS has similar OpenMPI MPI_Init failure, add dll load to global here import platform import ctypes if platform.system() == 'Linux': - ctypes.CDLL("libmpi.so", mode=ctypes.RTLD_GLOBAL) + ctypes.CDLL("libmpi.so.12", mode=ctypes.RTLD_GLOBAL) __doc__= '''\ Distributed trainers manage trainers in distributed environment. @@ -118,4 +118,4 @@ def data_parallel_distributed_trainer(communicator, use_async_buffered_parameter if (isinstance(communicator, QuantizedCommunicator)): return cntk_py.create_quantized_data_parallel_distributed_trainer(communicator, use_async_buffered_parameter_update) else: - return cntk_py.create_data_parallel_distributed_trainer(communicator, use_async_buffered_parameter_update) \ No newline at end of file + return cntk_py.create_data_parallel_distributed_trainer(communicator, use_async_buffered_parameter_update)