TotalView Support
TotalView is a full-featured, source-level, graphical debugger for applications written in C, C++, Fortran (77 and 90), assembler, and mixed source/assembler codes. It is a multiprocess, multithread debugger that supports multiple parallel programming paradigms including MPI, PVM and OpenMP.
Availability | Getting Started | Using the Client | Documentation | Vendor Forums
The University has a near-site license (256 tokens) for Totalview on all versions of Linux. We also maintain Sun Solaris, SGI IRIX, and IBM AIX platforms but they are not updated.
Getting Started with TotalView
Your code must be compiled appropriately to use Totalview. For most Unix compilers, the debug flag -g must be added to the compilation options, just as it would be for other debuggers such as gdb. Optimization should also generally be suppressed, since optimization can change the code in ways that make it difficult for the debugger to interpret. Once the code has been recompiled and an executable generated, you are ready to invoke Totalview.
The most recent version of TotalView is installed in the /common/toolworks/totalview directory. To start TotalView, use the command totalview.
Totalview is an X11 application and to use it directly, you must have an X server running on your local system. Computers running Linux will automatically have an X server available. Mac OS X has an X server; under Leopard and higher it is installed in the Utilities folder; for earlier versions it must be installed from the DVD that came with your computer. Windows users must install an X server; see Windows tools for Unix for some information about X servers for Windows.
The recommended way to run X applications remotely is to enable X11 port forwarding in your ssh client (SecureCRT, PuTTY, etc.) and run the X server in the background (passively).
Using Totalview to Debug MPI Codes on the Linux Clusters
One of the most powerful features of Totalview is its ability to debug parallel codes. ITC's license permits debugging of MPI jobs on on any Linux cluster. Running MPI jobs on the frontend is not good practice, since the frontends have only two cpus and many other tasks; you must use the compute nodes through PBS to debug MPI programs. The simplest way to debug MPI jobs is to use the Totalview client.
The Totalview client runs through an ssh-tunneled VPN connection that
is established between your computer and the remote host. It does not
require that you install an X server. To use the client, go to the
TotalviewTech Website and
download it. Note that you will not be downloading the debugger,
just the Remote Display Client. The client is available for Windows
(XP and Vista, 32-bits at present) and Linux (32 and 64 bits). (Unfortunately,
no Mac version is available at this time, though it has been requested.) Once
you have obtained the appropriate client, install it to your computer. The
Windows version is a self-extracting .exe file (possibly zipped), whereas the
Linux versions are tarfiles and must be extracted. The Windows version will
install in the familiar manner; under Linux untar the file (tar xf) and run the
remote_display_client.sh in the
Once you have installed and started the client, you should see a screen
similar to this screenshot. Not all the blanks
will be filled in initially; in particular, if your user ID is not filled
in or is incorrect, be sure to enter it into the appropriate field,
in the upper right. Enter the appropriate frontend name as the Remote Host.
The client has the ability to use intermediate hosts, so if you are working
from off-Grounds you can enter blue.unix.virginia.edu as the first
Host in the list in the middle of the screen; otherwise leave that list blank.
Enter the path as shown. The version of the client currently requires an
extra argument as indicated. You do not need to give a path to the executable
though you may do so. If you are going to do a short debugging run of a
serial code you may do so from the frontend, so leave the
Now go to one of the cluster frontends and
Return to the client and click
You can browse for the executable, but if you have input files or other
files that the binary needs, once the debugger window opens you should go to
the File menu, select
Once the executable has been selected, the source should appear in the
Totalview window. The Totalview graphical user interface is fairly
intuitive: click on a line number to set a breakpoint; hit
If you have a long debugging job or you want to debug an MPI application,
you should run the client via PBS. In the dropdown menu for
After you have readied your TV job script, enter its path and launch your
debug job. It is not necessary to enter any intermediate hosts even though
you will not be running on the frontend. If you request the test queue
For an MPI job, after you select your binary click the "Parallel" tab and
choose the appropriate MPI and number of processes.
Exiting the debug session terminates the PBS job as well.
All TotalView documentation can be accessed
online.
TotalView online
tutorials
accessed from the TotalviewTech website.
LLNL TotalView tutorial accessed from Lawrence Livermore National Lab.
If users cannot find the answers to their questions in the online
documentation, they can email their questions to
UVACSE.
Totalview's
forums at the vendor website
Using the Client from the Frontend
Not Applicable
dropdown in the "Submit Job" line.
cd
cp /etc/X11/twm/system.twmrc ./.twmrc
Launch Debug Session
. This should
start up a DOS command window that will request your password; then it
will request it again. After you have authenticated successfully, it will
start a circa-1985 X11 desktop. The grid outline is for you to position
the windows it is starting; move them to a convenient location and left-click.
To resize, go to the background and right-click to bring up a menu;
find resize and select it to get a resizing cursor. You
should then have a desktop similar to this
screenshot.
Search Path
, click Add
, and browse for
the path.
Go
to
start the program, etc. However, the vendor maintains some excellent
documentation
at their Web site.
Using the Client on the Nodes
Submit Job
to Batch Queueing System
, select PBS. It will then reveal more fields
to fill in the path to the job script and to provide any options to
qsub. You must use a C-shell script; two templates are provided
here for you to download. The first is for a
serial job and the second is for
an MPI job. You may need to edit these
scripts to change MPI modules or to cd to an appropriate directory.
For more complex changes please note that these are C-shell scripts
(this is required by the vendor) and not the bash scripts to which most
users are accustomed.
testq
it should start fairly promptly (but will be limited in time);
otherwise it will wait like any other job in the default queue. When it
starts the desktop will appear just as if you were on the frontend. Proceed
from there as if debugging on the frontend.
Documentation
TotalviewTech Documentation
Tutorials