NERSCPowering Scientific Discovery Since 1974

Totalview

Description

TotalView from Rogue Wave Software is a parallel debugging tool that can be run with up to 512 processors.

It provides both X Windows-based Graphical User Interface (GUI) and command line interface (CLI) environments for debugging. The performance of the GUI can be greatly improved if used in conjunction with free NX software.

The TotalView documentation web page is a good resource for learning more about some of the advanced TotalView features.

Accessing Totalview at NERSC

To use TotalView at NERSC, first load the TotalView modulefile to set the correct environment settings with the following command:

% module load totalview

Compiling Code to Run with TotalView

In order to use TotalView, 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:

% ftn -g -o testTV_ex testTV.f          # on Hopper
% mpif90 -g -o testTV_ex testTV.f       # on Carver or Euclid

A C example:

% cc -g -o testTV_ex testTV.c           # on Hopper
% mpicc -g -o testTV_ex testTV.c        # on Carver or Euclid

Starting a Job with TotalView

Be sure to log in with an 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 -X username@hopper.nersc.gov

After loading the TotalView module and compiling with the -g option, request and interactive batch session on Hopper or Carver. On Euclid, you launch a TotalView session interactively.

% qsub -I -V -q debug -lmppwidth=numCores                  # on Hopper
% qsub -I -V -q debug -lnodes=numNodes:ppn=numTasksPerNode # on Carver

Then launch the debugger with the totalview command followed by the name of the executable to debug:

% totalview aprun -a -n numTasks testTV_ex                 # on Hopper
% totalview mpirun -a -np numTasks testTV_ex               # on Carver or Euclid

In case of debugging a serial code on Carver or Euclid, you can run as follows:

% totalview testTV_ex                                      # on Carver or Euclid

 The TotalView startup GUI will pop up and show debugging startup parameters. After reviewing them, click OK.

startup parameters

Go to the process window, and click the Go button.

Process window

A small window will then pop up, asking whether the aprun process (or mpirun process on Carver or Euclid in case of parallel debugging) should be stopped. Click 'Yes'.

Then, the process window will show the source code, waiting for your command.

If the user source code is not displayed in the process window at this stage, select the main routine in the stack trace pane (the upper left frame) of the process window.

To start debugging, create a break point by clicking on a line number in the source pane, and click 'Go'. After that, you can use other buttons ('Next', 'Step', 'Out', etc.).

Process window

 

Known Limitations

TotalView does not support on Cray systems:

  • Debugging MPI_Spawn(), OpenMP, or Cray SHMEM programs
  • Compiled EVAL points and expressions.
  • Type transformations for the PGI C++ compiler standard template library collection classes
  • Exception handling for the PGI C++ compiler run time library
  • Spawing a process onto the compute processors
  • Machine partitioning schemes, gang scheduling, or batch systems

Memory debugging (MemoryScape) doesn't work on Hopper. Rogue Wave Software is working on the problem.

Availability

PackagePlatformCategoryVersionModuleInstall DateDate Made Default
TotalView carver applications/ debugging 8.10.0-1 totalview/8.10.0-1 2012-07-31 2012-08-20
TotalView carver applications/ debugging 8.9.1 totalview/8.9.1 2012-01-12
totalview carver applications/ debugging 8.9.1-0 totalview/8.9.1 2011-06-13 2011-07-07
TotalView carver applications/ debugging 8.9.1-1 totalview/8.9.1-1 2011-08-09 2011-08-22
TotalView carver applications/ debugging 8.9.1-1 totalview/8.9.1-1 2011-08-09
TotalView euclid applications/ debugging 8.10.0-1 totalview/8.10.0-1 2012-07-31 2012-08-20
TotalView euclid applications/ debugging 8.9.1-1 totalview/8.9.1-1 2012-05-11 2012-05-11
totalview hopper applications/ debugging 1.0.6 totalview-support/1.0.6 2011-02-27
TotalView hopper applications/ debugging 8.10.0 totalview/8.10.0 2012-08-03 2012-08-20
TotalView hopper applications/ debugging 8.9.1 totalview/8.9.1 2012-08-03
totalview hopper applications/ debugging 8.9.1-0 totalview/8.9.1 2011-06-13 2011-07-07
TotalView hopper applications/ debugging 8.9.1-1 totalview/8.9.1-1 2011-08-09 2011-08-22
TotalView hopper applications/ debugging 8.9.1-1 totalview/8.9.1-1 2011-08-09
TotalView hopper applications/ debugging 8.9.1-1 totalview/8.9.1-1 2011-08-09
TotalView hopper applications/ debugging 8.9.1-1 totalview_ccm/8.9.1-1 2012-04-04 2012-04-04
TotalView hopper applications/ debugging 8.9.2 totalview/8.9.2 2012-02-21 2012-02-21