User`s guide
mpiprofile
11-177
Examples
In pmode, turn on the parallel profiler, run your function in parallel, and call the viewer:
mpiprofile on;
% call your function;
mpiprofile viewer;
If you want to obtain the profiler information from a communicating job outside of pmode
(i.e., in the MATLAB client), you need to return output arguments of mpiprofile info
by using the functional form of the command. Define your function foo(), and make it
the task function in a communicating job:
function [pInfo, yourResults] = foo
mpiprofile on
initData = (rand(100, codistributor()) ...
* rand(100, codistributor()));
pInfo = mpiprofile('info');
yourResults = gather(initData,1)
After the job runs and foo() is evaluated on your cluster, get the data on the client:
A = fetchOutputs(yourJob);
Then view parallel profile information:
pInfoVector = [A{:, 1}];
mpiprofile('viewer', pInfoVector);
See Also
profile | pmode | mpiSettings