User`s guide

Profiling Parallel Code
6-43
Amount of data transferred between each worker
Amount of time each worker spends waiting for communications
With the parallel profiler on, you can proceed to execute your code while the profiler
collects the data.
In the pmode Parallel Command Window, to find out if the profiler is on, type:
P>> mpiprofile status
For a complete list of options regarding profiler data details, clearing data, etc., see the
mpiprofile reference page.
Viewing Parallel Profile Data
To open the parallel profile viewer from pmode, type in the Parallel Command Window:
P>> mpiprofile viewer
The remainder of this section is an example that illustrates some of the features of the
parallel profile viewer. This example executes in a pmode session running on four local
workers. Initiate pmode by typing in the MATLAB Command Window:
pmode start local 4
When the Parallel Command Window (pmode) starts, type the following code at the
pmode prompt:
P>> R1 = rand(16, codistributor())
P>> R2 = rand(16, codistributor())
P>> mpiprofile on
P>> P = R1*R2
P>> mpiprofile off
P>> mpiprofile viewer
The last command opens the Profiler window, first showing the Parallel Profile Summary
(or function summary report) for worker (lab) 1.