PDA

View Full Version : MPICH-GM and Memory Debugging



PeterT-RogueWave
01-18-2007, 12:00 PM
In order to use memory debugging on MPI jobs, it is useful to link your code against the tvheap library as outlined in another FAQ (http://forum.etnus.com/cgi-bin/gforum.cgi?post=73#73). If you are using MPICH-GM though, you may see this error:

[1] Malloc hook test failed: the malloc provided by MPICH-GM is not
used, it may have been overloaded by a malloc provided by another
library.

The problem is that MPICH-GM uses it's own version of malloc for performance reasons, and when the program being debugged is linked against TotalView's libraries, it triggers MPICH-GM's check for malloc and raises this error. The issue is listed in Myrinet's FAQ with a work around. It requires a rebuild of MPICH-GM and we recommend in this case that you keep two versions available. One with memory debugging enabled, and another without memory debugging for general use and debugging. The link to Myrinet's FAQ regarding this is here:

http://www.myri.com/...serve/cache/301.html (http://www.myri.com/fom-serve/cache/301.html)