MATLAB: Does “matlabpool open local 4” fail when using the MPD build of the MPICH2 library

Parallel Computing Toolbox

We have an installation of MATLAB that uses the MPD build of the MPICH2 library. The command "matlabpool open local 4" generates following error messages on our cluster:
>>matlabpool open local 4
Starting matlabpool using the parallel configuration 'local'.
Waiting for parallel job to start...
Performing parallel job cleanup...
Done.
??? Error using ==> distcomp.interactiveclient.pGetSockets>iThrowIfBadParallelJobStatus at 107
The interactive parallel job finished without any messages.
Error in ==> matlabpool at 90
client.start('matlabpool', numlabs, config, 'nogui');
More information from troubleshooting steps is shown below:
setSchedulerMessageHandler(@disp)
matlabpool open local 4
Starting matlabpool using the parallel configuration 'local'.
Waiting for parallel job to start...
Checking parallel job status.
Checking parallel job status.
Checking parallel job status.
Checking parallel job status.
[...]
Job state is 'failed'
The following script was tried:
restoredefaultpath
setenv('MDCE_DEBUG', 'true');
sched = findResource('scheduler', 'Type', 'local');
job = sched.createParallelJob('Max', 4);
job.createTask(@pwd, 1 );
job.submit;
disp('about to wait for job...');
job.wait;
sched.getDebugLog(job)
… and the output of above was:
MATLAB core dump: Exit on fatal error (no core) enabled.
Warning: We're about to use the 1.0.3-mpd build
> In mpiLibConf at 3
In distcomp_evaluate_filetask>iSetCurrentTaskFromEnvironment at 254
In distcomp_evaluate_filetask at 18
In decodeLocalSingleTask
In decodeLocalSingleTask
Moreover, we have only one copy of "pathdef.m" on the MATLAB path, and it has all the necessary paths required to run the toolbox.

Best Answer

These errors are caused by an incompatibility between the MPD build of MPICH2 and the Local Scheduler.
To work around this issue, additional logic must be inserted into the 'mpiLibConf.m' file to only select the MPD build when not using the Local Scheduler. For example, if you have already modified the mpiLibConf.m file to use the MPD build of the library, consider adding the following:
if strcmp( getenv( 'MDCE_DECODE_FUNCTION' ), 'decodeLocalParallelTask' )
% Local scheduler - don't use the MPD build
warning( 'Local scheduler: about to use default installed MPICH2 build' );
if ismac
extras = {'libmpich.dylib'};
primaryLib = 'libpmpich.dylib';
else
primaryLib = 'libmpich.so';
end
end
This should select the default MPI libraries if the Local Scheduler is used.
Related Question