Starting the debugger when an error occurs


Up: Debugging MPI programs with built-in tools Next: Attaching a debugger to a running program Previous: Starting jobs with a debugger

It is often convenient to have a debugger start when a program detects an error. If mpich was configured with the option --enable-mpedbg, then adding the command-line option -mpedbg to the program will cause mpich to attempt to start a debugger (usually dbx or gdb) when an error that generates a signal (such as SIGSEGV) occurs. For example,

    mpirun -np 4 a.out -mpedbg  
If you are not sure if your mpich provides this service, you can use -mpiversion to see if mpich was built with the --enable-mpedbg option.



Up: Debugging MPI programs with built-in tools Next: Attaching a debugger to a running program Previous: Starting jobs with a debugger