Sun Studio 12: Performance Analyzer

Collecting Data by Starting dbx Under MPI

To start dbx and collect data under the control of MPI, use the following syntax.

On Sun HPC ClusterTools 7:


% mpirun -np n dbx program-name < collection-script

On Sun HPC ClusterTools 6 or earlier:


% mprun -np n dbx program-name < collection-script

In each case, n is the number of processes to be created by MPI and collection-script is a dbx script that contains the commands necessary to set up and start data collection. This procedure creates n separate instances of dbx, each of which records an experiment on one of the MPI processes. If you do not define the experiment name, the experiment is labelled with the MPI rank. Read the section Storing MPI Experiments for information on where and how to store the experiments.

You can name the experiments with the MPI rank by using the collection script and a call to MPI_Comm_rank() in your program. For example, in a C program you would insert the following line.


ier = MPI_Comm_rank(MPI_COMM_WORLD,&me);

In a Fortran program you would insert the following line.


call MPI_Comm_rank(MPI_COMM_WORLD, me, ier)

If this call was inserted at line 17, for example, you could use a script like this.


stop at 18
run program-arguments
rank=$[me]
collector enable
collector store filename experiment.$rank.er
cont
quit