Quick Reference Guide |
MPI debugging using dbx |
I was using Maxima, and trying to track down the cause of the message:
Note: IEEE floating-point exception flags raised:
Inexact; Division by Zero;
Note: IEEE floating-point exception flags raised:
Inexact; Division by Zero; Invalid Operation;
My method was as follows. It requires two different windows to be open on the machine in question, and follows a combination of approaches from the SUN debugging guide and a guide to MPI debugging on SGI using dbx.
| Window 1 | Window 2 |
| Compile with -g and -ftrap=%all,no%underflow,no%inexact | % dbx |
| % mprun -np 4 ./prog | |
| <^Z> straight away | |
| % ps -ef | grep prog | |
| (dbx) attach -p <pid> ./prog | |
| Reading prog | |
| % fg | |
| (dbx) catch fpe | |
| (dbx) cont | |
| Program will run until trap or termination | Trap will be detailed |
Using this method the floating point exceptions chosen to be tested for in
compilation can be found - and hopefully eliminated. If it manages to
avoid them all them the previous error message at termination becomes:
Note: IEEE floating-point exception traps enabled:
overflow; division by zero; invalid operation;
| Return to homepage | E-mail comments |