Parallel Programming Guide for HP-UX Systems

MPI
Profiling
Chapter 2 71
Profiling
The following provides information about utilities you can use to analyze
HP MPI applications. The topics covered are:
Using counter instrumentation
Creating an instrumentation profile
Viewing ASCII instrumentation data
Using the profiling interface
Using counter instrumentation
Counter instrumentation is a lightweight method for generating cumulative runtime
statistics for your MPI applications. When you create an instrumentation profile, HP MPI
creates an ASCII format.
You can create instrumentation profiles for applications linked with the standard HP MPI
library, and for applications linked with HP MPI version 2.0, you can also create profiles for
applications linked with the thread-compliant library. Instrumentation is not supported for
applications linked with the diagnostic library (-ldmpi).
Creating an instrumentation profile
Create an instrumentation profile using one of the following methods:
Use the following syntax:
mpirun -i
spec
-np #
program
For example, to create an instrumentation profile for an application called compute_pi.f,
enter:
% $MPI_ROOT/bin/mpirun -i compute_pi -np 2 compute_pi
This invocation creates an instrumentation profile in the following format:
compute_pi.instr (ASCII).
Specify a filename prefix using the MPI_INSTR environment variable. For example,
% setenv MPI_INSTR
compute_pi
Specifies the instrumentation output file prefix as compute_pi.