TutorialsTutorials HomeDebuggingIntroductionGood Practices Compiler Errors Run-Time Errors Wrong Answers MPI Errors Utilities
FullDocument
Related InfoTotalviewDebugging Tools |
MPI ErrorsSpecial considerations must be taken when debugging MPI codes. Not only is the programming paradigm less familiar than traditional serial programming, but synchronization problems can be particularly tricky to identify. The best advice for debugging MPI is to have a good reference available, as man pages can be incomplete (e.g. the Fortran bindings are missing from the man pages here at NERSC). In addition, always run test cases before you implement a routine in a large code. You can never be sure that you understand how an MPI binding works until you've run test cases on the specific machine you will implement it on. General StrategyIt's difficult to identify a general strategy for debugging MPI codes, since every program tends to be so different. But it's always a good idea to check the man page on every binding to make sure the syntax is correct. The best tool for debugging MPI codes is Totalview. Totalview allows you to view variables on any processor and set break points in multiple places. An important consideration is that often it is best to set a break point after a chunk of code which contains complicated communication procedures, because otherwise the line-by-line stepping of Totalview can affect communication behavior.
Things to look for when using Totalview include the arguments being passed
in an MPI call. Is every processor passing the arguments you think
it's passing? Totalview is also handy for checking message tags when
the code hangs. Another problem that can be easily spotted in Totalview
is if one processor has stopped execution through a Common ErrorsHere are some common MPI errors:
|
![]() |
Page last modified: Fri, 07 Nov 2003 20:14:44 GMT Page URL: http://www.nersc.gov/nusers/help/tutorials/debug/mpi.php Web contact: webmaster@nersc.gov Computing questions: consult@nersc.gov Privacy and Security Notice |
![]() |