Using TotalView with LSF-HPC

HP recommends the use of xterm when debugging an application with LSF-HPC. You also need to allocate the nodes you will need.

You may need to verify the full path name of the xterm and mpirun commands:

First run a bsub command to allocate the nodes you will need and to launch an xterm window:

$ bsub -nx-ext "SLURM[nodes=x]" \ -Is /usr/bin/xterm

Enter an mpirun -tvcommand in the xterm window to start TotalView on the application you want to debug:

$ mpirun -tv -srun application

Setting TotalView Preferences

You should set TotalView preferences the first time you invoke it. For example, you need to tell TotalView how to launch TotalView processes on all the cores.

The TotalView preferences are maintained in a preferences file named .totalview/preferences in your home directory, so you only need to set these preferences once.

Follow these steps to set the TotalView preferences:

1.Invoke the TotalView debugger:

$ totalview

TotalView's main control window (called the TotalView Root Window) appears.

2.Select Preferences from the File pull-down menu. A Preferences window opens.

3.Click on the Launch Strings tab in the Preferences window.

4.Ensure that the Enable single debug server launch button is selected in the Launch Strings tab.

5.In the Launch Strings table, in the area immediately to the right of Command:, verify that the default command launch string shown is as follows:

%C %R -n "%B/tvdsvr -working_directory %D -callback %L -set_pw %P -verbosity %V %F"

You may be able to obtain this setting by clicking the Defaults button; otherwise, you need to enter this command launch string.

6.Click on the Bulk Launch tab in the Preferences window.

Make sure that Enable debug server bulk launch is not selected.

7.Click on the OK button at the bottom-left of the Preferences window to save these changes.

8.Exit TotalView by selecting Exit from the File pulldown menu.

The TotalView launch preferences are configured and saved. You can change this configuration at any time.

Debugging an Application

This section describes how to use TotalView to debug an application.

1.Compile the application to be debugged. For example:

$ mpicc -g -o Psimple simple.c -lm

Use the -goption to enable debugging information.

2.Run the application in TotalView:

$ mpirun -tv -srun -n2 ./Psimple

3.The TotalView main control window, called the TotalView root window, opens. It displays the following message in the window header:

Etnus TotalView Version#

DDT 55