Debugging with MPE
From BCCD 3.0
Sometimes you just need to know what's going on. And when you need to know what's going on with mpich programs and processes (as opposed to work, life, etc.), MPE tools such as mpilog, mpitrace, and mpianim are lower-level tools to help you on your way.
Debugging with Mpilog
This option builds your mpich program to generate an MPI logfile. The three log formats mpilog can create are .alog, .clog, and .slog. .clog is created by default. The debugging program upshot uses the .alog (ASCII log) extension. To create an .alog file, follow the instructions here.
Debugging with Mpitrace
This option generates verbose output of all MPI calls. Fun to watch. Compile your program like below (where
prog is the name of your program):
mpicc -mpitrace -o prog -lm prog.c
Then run your program as usual. Be prepared for fun verbose output!
Debugging with Mpianim
This option allows you to watch a real-time animation of your process communication. Two notes:
- You NEED X for this to work.
- It goes really fast for small programs.
Log into X (the
startx command usually does the trick) and issue the following command, where
prog is the name of your program:
mpicc -mpianim -o prog -lm prog.c -lX11
Then run your program as usual, but look for an animated X screen!