[size 2]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. 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

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: