HP-MPI User's Guide (11th Edition)
Debugging and troubleshooting
Debugging HP-MPI applications
Chapter 6 201
my_appfile resides on the local machine (local_host) in the
/work/mpiapps/total directory.
To debug this application using TotalView (in this example, TotalView is
invoked from the local machine):
1. Place your binary files in accessible locations.
• /path/to/program1 exists on local_host
• /path/to/program2 exists on remote_host
To run the application under TotalView, the directory layout on
your local machine, with regard to the MPI executable files, must
mirror the directory layout on each remote machine. Therefore,
in this case, your setup must meet the following additional
requirement:
• /path/to/program2 exists on local_host
2. In the /work/mpiapps/total directory on local_host, invoke TotalView
by passing the -tv option to mpirun:
% $MPI_ROOT/bin/mpirun -tv -f my_appfile
Using the diagnostics library
HP-MPI provides a diagnostics library (DLIB) for advanced run time
error checking and analysis. DLIB provides the following checks:
• Message signature analysis—Detects type mismatches in MPI calls.
For example, in the two calls below, the send operation sends an
integer, but the matching receive operation receives a
floating-point number.
if (rank == 1) then
MPI_Send(&buf1, 1, MPI_INT, 2, 17, MPI_COMM_WORLD);
else if (rank == 2)
MPI_Recv(&buf2, 1, MPI_FLOAT, 1, 17, MPI_COMM_WORLD,
&status);
• MPI object-space corruption—Detects attempts to write into objects
such as MPI_Comm, MPI_Datatype, MPI_Request, MPI_Group, and
MPI_Errhandler.
• Multiple buffer writes—Detects whether the data type specified in a
receive or gather operation causes MPI to write to a user buffer more
than once.