Parallel Programming Guide for HP-UX Systems

MPI
Debugging
Chapter 254
Using Visual MPI
Visual MPI is an MPI analysis tool focused on error detection and visualization, with
automatic correlation to application source code. While Visual MPI includes a range of
features, there are several highlights: ease of use (near-zero initial learning curve), automated
analysis capabilities, and reporting of a range of programming errors. For more information
about Visual MPI, refer to the documents available at http://www.hp.com/go/mpi and in the
Visual MPI online help.
NOTE Visual MPI usage requires that your application is linked with the MPI shared
libraries, and be started with the mpirun command.
Visual MPI is supported on HP-UX 11i v2 (Itanium-based platforms only), Linux Intel IA-32
and Itanium, and Tru64UNIX 5.1 or higher.
Visual MPI for Tru64UNIX requires the subset containing the Base System, as well as the
Software Development subset OSFPGMR.
Using a single-process debugger
Because HP MPI creates multiple processes and ADB, DDE, XDB, WDB, GDB, and
LADEBUG 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 avoid a possible race condition while the debugger session starts and
attaches to a process. MPI_DEBUG_CONT is an environment 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 eladebug option in the MPI_FLAGS
environment variable to use the ADB, XDB, DDE, WDB, GDB, or LADEBUG
debugger respectively.
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.
Step 3. Run your application.
When your application enters MPI_Init, HP MPI starts one debugger session per
process and each debugger session attaches to its process.
Step 4. Set a breakpoint anywhere following MPI_Init in each session.