TotalView Debugger

TotalView is a sophisticated and powerful tool used for debugging and analyzing both serial and parallel programs. TotalView provides source level debugging for serial, parallel, multi-process, multi-threaded, accelerator/GPU and hybrid applications written in C/C++ and Fortran. Most HPC platforms and systems are supported. Both a graphical user interface and command line interface are provided. Advanced, dynamic memory debugging tools and the ability to perform "replay" debugging are two additional features. TotalView has been selected as the DOE ASC Program's debugger of choice for its HPC platforms.

Platforms and Locations

Platform Location Notes
x86_64 Linux /usr/tce/packages/totalview/toolworks/ Multiple versions are available. Load with modules.
CORAL /usr/tce/packages/totalview/toolworks/ Multiple versions are available. Load with modules.

Quick Start

At LC, most of the "setup" for using TotalView is automatically provided for users. In fact, the default version of TotalView is included in every user's path, and unless an alternate version is desired, it is not necessary to load a module.

1. Compiling: source code needs to be compiled with the -g flag. Additionally, optimization flags should not be used (if possible) as compiler optimizations can "rewrite" your program and produce machine code that doesn't necessarily match your source code.

2. Optional: see what versions of TotalView are available if you desire a version other than the default version, and load the dotkit package of choice. In the example below, the default version of TotalView is loaded for illustrative purposes.

% module avail totalview

-------------------------- /usr/tce/modulefiles/Core ---------------------------
   totalview/2016.01.06     totalview/2017.1.21    totalview/2018.3.8
   totalview/2016.04.08     totalview/2017.3.8     totalview/2019.0.4
   totalview/2016.06.21     totalview/2018.0.5     totalview/2019.2.20
   totalview/2016.07.22     totalview/2018.1.12    totalview/2019.3.14 (D)
   totalview/2017X.01.07    totalview/2018.2.6     totalview/2020X.0.3

  Where:
   D:  Default Module

Use "module spider" to find all possible modules.
Use "module keyword key1 key2 ..." to search for all possible modules matching
any of the "keys".

% module load totalview

3. Start TotalView: there are several different ways to start the debugger, depending upon what you want to do. Three examples for starting the TotalView GUI are shown below:

  1. Standalone, as might be done in order to attach to a running process
  2. With a serial code, or single process threaded code
  3. With a parallel MPI code (with or without threads) under SLURM in the pdebug partition
1% totalview &

2% totalview myapp &

3% totalview srun -a -N4 -n32 -p pdebug myapp &

4. What happens next depends upon how you started TotalView. If you started it Standalone, only the Session Manager window will appear. If you started it with an application (serial or parallel) the Root and Process windows will appear. Examples of all three windows are shown below (click for larger image).

5. You are now ready to begin debugging.

Because TotalView is a full-featured tool, detailed instructions are not provided here. Instead, users can consult LC's TotalView tutorial as a starting point for becoming familiar with TotalView's functionality.

Troubleshooting

  • Consult the vendor documentation (below)
  • Contact the LC Hotline to report a problem.

Documentation and References

LLNL-WEB-670397