Configure options for MPI communication
mpiSettings('DeadlockDetection','on')
mpiSettings('MessageLogging','on')
mpiSettings('MessageLoggingDestination','CommandWindow')
mpiSettings('MessageLoggingDestination','stdout')
mpiSettings('MessageLoggingDestination','File','filename')
mpiSettings(' turns on deadlock detection
during calls to DeadlockDetection','on')labSend and labReceive. If deadlock is detected,
a call to labReceive might cause an error. Although
it is not necessary to enable deadlock detection on all workers, this
is the most useful option. The default value is 'off' for
communicating jobs, and 'on' inside pmode sessions or spmd statements. Once the setting has
been changed within a pmode session or
an spmd statement, the setting stays
in effect until either the pmode session
ends or the parallel pool is closed.
mpiSettings(' turns on MPI message logging.
The default is MessageLogging','on')'off'. The default destination is
the MATLAB® Command Window.
mpiSettings(' sends MPI logging
information to the MATLAB Command Window. If the task within
a communicating job is set to capture Command Window output, the MPI
logging information will be present in the task's MessageLoggingDestination','CommandWindow')CommandWindowOutput property.
mpiSettings(' sends MPI logging information
to the standard output for the MATLAB process. If you are using
a MATLAB job scheduler (MJS), this is the mdce service log file.MessageLoggingDestination','stdout')
mpiSettings(' sends MPI logging
information to the specified file.MessageLoggingDestination','File','filename')
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