User`s guide

mpiSettings
11-179
Examples
Set deadlock detection for a communicating job inside the jobStartup.m file for that
job:
% Inside jobStartup.m for the communicating job
mpiSettings('DeadlockDetection', 'on');
myLogFname = sprintf('%s_%d.log', tempname, labindex);
mpiSettings('MessageLoggingDestination', 'File', myLogFname);
mpiSettings('MessageLogging', 'on');
Turn off deadlock detection for all subsequent spmd statements that use the same
parallel pool:
spmd; mpiSettings('DeadlockDetection', 'off'); end
More About
Tips
Setting the MessageLoggingDestination does not automatically enable message
logging. A separate call is required to enable message logging.
mpiSettings has to be called on the worker, not the client. That is, it should be called
within the task function, within jobStartup.m, or within taskStartup.m.