NERSC logo National Energy Research Scientific Computing Center
  A DOE Office of Science User Facility
  at Lawrence Berkeley National Laboratory
PackagePlatformCategoryVersionModule Install DateDate Made Default
totalview franklin applications/debugging 8.6.0 totalview/8.6.0 2010-02-04
totalview franklin applications/debugging 8.7.0 totalview/8.7.0 2010-02-04 2010-02-04
totalview hopper applications/debugging 8.6.0 totalview/8.6.0 2010-02-04
totalview hopper applications/debugging 8.7.0 totalview/8.7.0 2010-02-04 2010-02-04

Using the Totalview Debugger at NERSC

Introduction

The Totalview is an X Windows-based graphical parallel debugger. Typically a code is compiled for debugging by adding the -g compiler option when building a code. The code can then be run under totalview to step through the program, set break points, examine variables, etc., while viewing the source code. Totalview can also be used to examine core files and attach to running programs.

TotalView Documentation

Totalview Technologies provides a documentation web site. Additional instructions specific to NERSC platforms are described below.

Hopper and Franklin

NERSC has a license to debug applications using up to 512 cores on Hopper and Franklin. If you need to debug an application on more than 512 cores please email the consultants at consult@nersc.gov.

  1. Log into Franklin or Hopper with X window forwarding enabled

    This could mean using the -X or -Y option to ssh. The -Y option often works better for Mac OSX.

    % ssh -Y username@franklin.nersc.gov
    
  2. Load the Totalview module

    franklin% module load totalview
    
  3. Compile your code with debugging flags

    In order to use Totalview (or any debugger), your code must be compiled with the -g option. We also recommend that you do not run with optimization turned on, flags such as -fast.

    A Fortran example:

    franklin% ftn -g -o test.x test.f
    

    A C example:

    franklin% cc -g -o test.x test.c
    
  4. Request and interactive batch session

    franklin% qsub -I -V -q debug -lmppwidth=numCores 
    
  5. Launch the debugger

    franklin% totalview aprun.tv -a -n [numProcs] test.x
    
    Notice you are using aprun.tv rather than aprun
  6. Debug your application

    Once totalview starts, click on "Go", the green arrow, and Totalview will tell you that "aprun.tv" is a parallel job and ask if you want to stop the parallel program. Answer "Yes" and you will be positioned at the beginning of your code. You can then set break points, etc. Refer to the Totalview Technologies documentation web site to learn how to use the advanced features of Totalview.


LBNL Home
Page last modified: Mon, 12 Apr 2010 17:12:05 GMT
Page URL: http://www.nersc.gov/nusers/systems/franklin/software/totalview.php
Web contact: webmaster@nersc.gov
Computing questions: consult@nersc.gov

Privacy and Security Notice
DOE Office of Science