| Package | Platform | Category | Version | Module |
Install Date | Date 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.
-
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
-
Load the Totalview module
franklin% module load totalview
-
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
-
Request and interactive batch session
franklin% qsub -I -V -q debug -lmppwidth=numCores
-
Launch the debugger
franklin% totalview aprun.tv -a -n [numProcs] test.x
Notice you are using aprun.tv rather than aprun
-
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.
|