mpiprofile
Profile parallel communication and execution times
Syntax
mpiprofile
mpiprofile on <options>
mpiprofile off
mpiprofile reset
mpiprofile viewer
mpiprofile resume
mpiprofile clear
mpiprofile status
stats = mpiprofile('info')
mpiprofile('viewer',stats)
Description
mpiprofile
enables or disables the parallel profiler data collection on a MATLAB® worker running in a parallel pool. You can use mpiprofile
either from the MATLAB client or directly from the worker from within an spmd
block. When you run mpiprofile
from the MATLAB client, mpiprofile
performs the action on the MATLAB workers.
mpiprofile
aggregates statistics on execution time and communication times. mpiprofile
collects statistics in a manner similar to running the profile
command on each MATLAB worker. By default, the parallel profiling extensions include array fields that collect information on communication with each of the other workers.
mpiprofile on <options>
starts the parallel profiler and clears previously recorded profile statistics.
mpiprofile
takes the following options.
Option | Description |
---|---|
| This option specifies the detail at which communication information is stored.
Note that changing For information about the structure of returned data, see |
|
No other |
mpiprofile off
stops the parallel profiler. To reset the state of the profiler and disable collecting communication information, use mpiprofile reset
.
mpiprofile reset
turns off the parallel profiler and resets the data collection back to the standard profiler. If you do not call reset
, subsequent profile
commands will collect MPI information.
mpiprofile viewer
stops the profiler and opens the graphical profile browser with parallel options. The output is an HTML report displayed in the profiler window. The file listing at the bottom of the function profile page shows several columns to the left of each line of code. In the summary page:
Column 1 indicates the number of calls to that line.
Column 2 indicates total time spent on the line in seconds.
Columns 3–6 contain the communication information specific to the parallel profiler.
mpiprofile resume
restarts the profiler without clearing previously recorded function statistics.
mpiprofile clear
clears the profile information.
mpiprofile status
returns the status of the parallel profiler.
stats = mpiprofile('info')
stops the parallel profiler and returns a structure containing the profiler statistics. stats
contains the same fields as returned by profile('info')
, with the following additional fields in the FunctionTable
entry. All these fields are recorded on a per-function and per-line basis, except for the *PerLab
fields.
Field | Description |
---|---|
BytesSent | Records the quantity of data sent |
BytesReceived | Records the quantity of data received |
TimeWasted | Records communication waiting time |
CommTime | Records the communication time |
CommTimePerLab | Vector of communication receive time for each worker |
TimeWastedPerLab | Vector of communication waiting time for each worker |
BytesReceivedPerLab | Vector of data received from each worker |
The three *PerLab
fields are collected only on a per-function basis, and you can turn them off by typing the following command:
mpiprofile on -messagedetail simplified
When you run it from the MATLAB client, stats = mpiprofile('info')
returns information from all workers. When you run it on a worker, mpiprofile('info')
returns the profile information specific to that worker.
mpiprofile('viewer',stats)
opens the graphical profile browser showing the profiling information contained in stats
. You can use stats = mpiprofile('info')
on the client to create the structure array.
mpiprofile
does not accept -timer clock
options, because the communication timer clock must be real.
For more information and examples on using the parallel profiler, see Profiling Parallel Code.
Examples
Version History
Introduced in R2007b