The Solaris utility gprof may be used for multiprocess codes, such as those that use MPI. It can be helpful for profiling user routines, which are not automatically instrumented with TNF probes by Sun HPC ClusterTools 3.0 software. Several points should be noted:
Codes should be compiled and linked with -pg for Fortran or -xpg for C.
The environment variable PROFDIR may be used to profile multiprocess jobs, such as those that use MPI.
The gprof should be used after program execution to gather summary statistics either on individual processes or for multiprocess aggregates.
The Sun MPI libraries are not profiled. Typically, on-node data transfers will appear as memcpy calls while transfers between nodes will appear as read and write calls in gprof profiles.
There may be no obvious relationships between process ids, used to tag profile files, and MPI process ranks.
There is a very small chance that profiles from different processes will overwrite one another if a multiprocess job spans multiple nodes.
For more information about gprof, see the gprof man page.