HP-MPI User's Guide (11th Edition)
Debugging and troubleshooting
Debugging HP-MPI applications
Chapter 6 197
Debugging HP-MPI applications
HP-MPI allows you to use single-process debuggers to debug
applications. The available debuggers are ADB, DDE, XDB, WDB, GDB,
and PATHDB. You access these debuggers by setting options in the
MPI_FLAGS environment variable. HP-MPI also supports the
multithread, multiprocess debugger, TotalView on Linux and HP-UX for
Itanium-based systems.
In addition to the use of debuggers, HP-MPI provides a diagnostic library
(DLIB) for advanced error checking and debugging. HP-MPI also
provides options to the environment variable MPI_FLAGS that report
memory leaks (l), force MPI errors to be fatal (f), print the MPI job ID
(j), and other functionality.
This section discusses single- and multi-process debuggers and the
diagnostic library; refer to “MPI_FLAGS” on page 137 for information
about using the MPI_FLAGS option.
Using a single-process debugger
Because HP-MPI creates multiple processes and ADB, DDE, XDB, WDB,
GDB, and PATHDB only handle single processes, HP-MPI starts one
debugger session per process. HP-MPI creates processes in MPI_Init,
and each process instantiates a debugger session. Each debugger session
in turn attaches to the process that created it. HP-MPI provides
MPI_DEBUG_CONT to control the point at which debugger attachment
occurs. MPI_DEBUG_CONT is a variable that HP-MPI uses to temporarily
halt debugger progress beyond MPI_Init. By default, MPI_DEBUG_CONT is
set to 0 and you must reset it to 1 to allow the debug session to continue
past MPI_Init.
The following procedure outlines the steps to follow when you use a
single-process debugger:
Step 1. Set the eadb, exdb, edde, ewdb, egdb, or epathdb option in the
MPI_FLAGS environment variable to use the ADB, XDB, DDE, WDB,
GDB, or PATHDB debugger respectively. Refer to “MPI_FLAGS” on
page 137 for information about MPI_FLAGS options.
Step 2. On remote hosts, set DISPLAY to point to your console. In addition, use
xhost to allow remote hosts to redirect their windows to your console.