HPCx homepage
Services User support Projects Research About us Sitemap Search  
  line          
Helpdesk User Guide Notices Bulletin Documentation
Training Porting Filestore Batch Interactive FAQ
               
home > support > FAQ > totalview > tv_mem_debug
spacer
hr
spacer

Memory Debugging using Totalview on HPCx

spacer
The latest version of Totalview on HPCx integrates a memory debugging feature. This can be used to monitor memory usage in both Fortan and C codes and can be helpful in identifying memory leaks in users' programs. AIX applications differ from applications running on other platforms as AIX does not support interposition . This means that HPCx users must recompile their codes in order to link in the Totalview heap replacement library. Please read the general instructions for running Totalview here before attempting to follow the memory debugging instructions below.

Instructions for using memory debugging features of Totalview

( In the following list, the instruction 'click' refers to left mouse button click .)

For Serial Jobs:

  1. Start Totalview with the usual (e.g.) tv ./a.out command.

  2. Click Tools->Memory Debugging to open the Memory Debugging Window of Totalview.

  3. In the main window, set a breakpoint (left mouse click on line number) where you wish to stop your source code.

  4. Click Go

  5. Click 'Enable memory debugging' in the Memory Debugging window.

  6. Memory Debugging is now enabled for this process. For example, to generate a view of the Heap Status click the Heap Status tab and then click Generate View.

For Parallel Jobs:

  1. Start an interactive loadleveler session as usual (e.g.) :
      user@l1f01$ runtv intmpihello.ll mpihello
    
    Enter your password if required. The Loadleveler GUI should appear on your display.

  2. Click Tools->Memory Debugging to open the Memory Debugging Window of Totalview. Do NOT click the 'Enable memory debugging' button at this point (this would attempt to debug the poe program that launches parallel programs rather than the parallel program itself).

  3. To connect to your own application you should click the Go button and answer Yes when asked whether you wish to stop poe. Your source code should now appear in the main Totalview Window and a list of your parallel processes should now appear within the Process Set area of the Memory Debugging Window.

  4. In the main window, set a breakpoint (left mouse click) or barrier (right mouse click) on one of the line numbers near the start of your source code. Click Go to start the program running. The program should stop at the breakpoint. (Due to asynchronicity of processes this may require more than one click of Go).

  5. In the Process Set list of the Memory Debugging Window left click on one of your parallel processes. Memory debugging information is now available. For example, to generate a view of the Heap Status click on the process you wish to inspect, Go to an appropriate breakpoint, then click the Heap Status tab and then click Generate View.

N.B. The Memory Debugging Window does not automatically refresh when switching between processes. To update the Memory Debugging window after switching processors click Window->Update .


More detailed information on the memory debugging features of Totalview can be found in the documentation provided at the
etnus website
spacer
hr
spacer
http://www.hpcx.ac.uk/support/FAQ/totalview/tv_mem_debug.html contact email - www@hpcx.ac.uk © UoE HPCX Ltd