30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Starting <strong>TotalView</strong><br />

Debugging an MPI<br />

Program<br />

Using gnu_debuglink<br />

Files<br />

<strong>TotalView</strong> Individual does not allow remote debugging.<br />

totalview executable<br />

(method 1) In many cases, you can start an MPI program<br />

in much the same way as you would start any other<br />

program. However, you will need to select the Parallel<br />

tab within the File > New Programs dialog box, and select<br />

the MPI version in addition to other options.<br />

mpirun -np count -tv executable<br />

(method 2) The MPI mpirun command starts the<br />

<strong>TotalView</strong> pointed to by the TOTALVIEW environment<br />

variable. <strong>TotalView</strong> then starts your program. This program<br />

will run using count processes.<br />

totalview executable<br />

If you have prepared a gnu_debuglink file, <strong>TotalView</strong><br />

can access this information. For more information, see<br />

“Using gnu_debuglink Files” within the Compilers and<br />

Platforms chapter of the <strong>TotalView</strong> Reference <strong>Guide</strong>.<br />

Here’s where you can find more information:<br />

� Debugging parallel programs such as MPI, PVM, or UPC, see Chapter 7,<br />

“Setting Up Parallel Debugging Sessions,” on page 131.<br />

� The totalview command, see “<strong>TotalView</strong> Command Syntax” in the <strong>TotalView</strong><br />

Reference <strong>Guide</strong>.<br />

� Remote debugging, see “Setting Up and Starting the <strong>TotalView</strong> Server” on<br />

page 81 and “<strong>TotalView</strong> Debugger Server (tvdsvr) Command Syntax” in the<br />

<strong>TotalView</strong> Reference <strong>Guide</strong>.<br />

Initializing <strong>TotalView</strong><br />

Starting <strong>TotalView</strong><br />

<strong>TotalView</strong> Variables<br />

Saving Action Points to a File<br />

When <strong>TotalView</strong> begins executing, it reads initialization and startup information<br />

from a number of files. The two most common are initialization files that<br />

you create and preference files that <strong>TotalView</strong> creates.<br />

An initialization file is a place where you can store CLI functions, set variables,<br />

and execute actions. <strong>TotalView</strong> interprets the information in this file whenever<br />

it begins executing. This file, which you must name tvdrc, resides in the<br />

.totalview subdirectory contained in your home directory. <strong>TotalView</strong> creates<br />

this directory for you the first time it executes.<br />

<strong>TotalView</strong> can actually read more than one initialization file. You can place<br />

these files in your installation directory, the .totalview subdirectory, the<br />

directory in which you invoke <strong>TotalView</strong>, or the directory in which the program<br />

resides. If an initialization file is present in one or all of these places,<br />

<strong>TotalView</strong> reads and executes each. Only the initialization file in your<br />

.totalview directory has the name tvdrc. The other initialization files have<br />

the name .tvdrc. That is, a dot precedes the file name.<br />

56 Chapter 4: Setting Up a Debugging Session

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!