TotalView

From HPC Wiki
Revision as of 17:42, 20 August 2019 by Fabian-orland-a681@rwth-aachen.de (talk | contribs) (Created page with "TotalView is a debugging software designed for high-scale HPC applications. It supports debugging serial as well as parallel applications. Supported parallel programming mode...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

TotalView is a debugging software designed for high-scale HPC applications. It supports debugging serial as well as parallel applications. Supported parallel programming models include OpenMP, MPI, OpenACC and CUDA.
This page briefly describes how to debug serial and parallel programs written in C, C++ or Fortran 90/95 using the TotalView debugger.

Debugging Serial Programs

Preparation

Before debugging the program needs to be compiled with debug information using the -g flag and without any optimization (-O0 flag).

Starting TotalView

There are three ways to start debugging your program:

  • by starting TotalView with your program as a parameter
    $ totalview a.out [ -a options ]
    
  • by starting your program first and then attaching TotalView to it. In this case just start
    $ totalview
    
    . You will be asked what you would like to debug. Choose A running program (attach) and look for your already started program.
  • by analyzing the core dump after your program crashed using
    $ totalview a.out <corefile>
    

If the program requires startup parameters like runtime arguments, environment variables or standard IO these can be set in the ProcessStartup Parameters... menu.
After starting your programm Total View opens the Process Window which consists of different parts summarized by the table below:

Source Pane displays the program's source code
Stack Trace Pane displays the call stack
Stack Frame Pane displays all variables associated with the selected stack routine
Tabbed Pane displays all breakpoints, action points and evaluation points in the Action Points subpane
displays all (MPI) processes in the Processes subpane
displays all threads of the current process in the Threads subpane
Status Bar displays the status of the current process and thread
Toolbar contains all action buttons

Breakpoints

A breakpoint can easily be set by clicking on a boxed line number of an executable statement in the Source Pane. To remove a breakpoint just click on the corresponding boxed line number again.