How do I use my own MPI library with the MATLAB Distributed Computing Engine 2.0 (R14SP3+)?

4 views (last 30 days)
I have read the instructions in the documentation of the MPILIBCONF function, as returned by the command:
doc mpilibconf
I am still unclear as to what modifications are needed to this file in order to use an alternative MPI library.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Aug 2012
This change has been incorporated into the documentation in Release 2010a (R2010a). For previous releases, read below for any additional information:
The default MPILIBCONF uses a simple library name in conjunction with the system library path to locate the MPI library. When specifying an alternate library, you can either modify the system library path and use a simple library name, or specify the full pathname of the alternate library.
The MPILIBCONF function relies on $MATLABROOT/bin/$ARCH always being on the system library path. This path is defined by the PATH variable on Windows, the LD_LIBRARY_PATH variable on Linux/UNIX, and the DYLD_LIBRARY_PATH variable on Mac. This is why the function uses the filename directly rather than the full path to the MPI library. If you wish to use your own MPI library, you can do one of the following:
1) Add the path to the directory containing the alternative MPI library to the system path. Note that you should add this directory to the path prior to starting the MDCE service if you are using a job manager, and prior to starting the SMPD service if you using the MPIExec scheduler.
2) A simpler alternative to changing the system path would be to specify the full path to your MPI library in the mpiLibConf.m file itself. For example:
function [lib, extras] = mpiLibConf
lib = '/path/to/my/libmpich.so';
extras = {};
Note that the alternative MPI library must meet the requirements that are discussed in the "Remarks" or "Tips" section of the documentation for MPILIBCONF.

More Answers (0)

Categories

Find more on MATLAB Parallel Server in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!