NERSC logo National Energy Research Scientific Computing Center
  A DOE Office of Science User Facility
  at Lawrence Berkeley National Laboratory
 

DDT on Franklin

Distributed Debugging Tool (DDT) from Allinea Software is the new parallel debugger for Franklin.

Contents


Introduction

DDT is a parallel debugger which can be run on Franklin with up to 1024 processors. Totalview users will find DDT has very similar functionality and an intuitive user interface. All of the primary parallel debugging features from Totalview are available with DDT. Please let us know how you like DDT and report any questions or problems to consult@nersc.gov

The Allinea DDT web page and users guide is a good resource for learning more about some of the advanced DDT features.

Loading the DDT Module

To use DDT at NERSC, first load the DDT module to set the correct environment settings with the following command:

Franklin% module load ddt

Compiling Code to run with DDT

In order to use DDT, code must be compiled with the -g option. We also recommend that you do not run with optimization turned on, flags such as -fast.

A Fortran example:

Franklin% ftn -g -o testDDT_ex testDDT.f
A C example:
Franklin% cc -g -o testDDT_ex testDDT.c

Starting a Job with DDT

Be sure to log into Franklin with an X window forwarding enabled. This could mean using the -X or -Y option to ssh. The -Y option often works better for Mac OSX.

% ssh -X username@Franklin.nersc.gov
After loading the DDT module and compiling with the -g option, start the debugger by typing ddt followed by the name of the executable to debug:
Franklin% ddt testDDT_ex
The DDT GUI will pop up and ask What would like to do? For basic debugging choose the option Run and Debug a Program . A user can also choose to Open a Core File . Currently on Franklin, Attach to a Running Program is not yet available.

DDT Popup Window

Then a submission window will appear with a path to the executable to debug. Select the number of processors on which to run and press submit. To pass command line arguments to a program enter them in the Arguments box. The job will be submitted to the debug queue. Depending on the number of jobs running and waiting in the debug queue, it could take a few minutes for the job to start. Jobs up to 512 processors can be run with DDT in the debug queue. To debug a job at a higher concurrency please email consult@nersc.gov with your request.

DDT Submit Window

Basic Debugging Functionality

The DDT GUI interface should be intuitive to anyone who has used a parallel debugger like Totalview before. Users can set breakpoints, step through code, set watches, examine and change variables, dive into arrays, dereference pointers, view variables across processors, step through processors etc. Please see the DDT Users Guide if you have trouble with any of these basic features.

Useful New DDT Features

Process Groups

With DDT, the user can easily change the debugger to focus on a single process or group of processes. If Focus on Processor is chosen, then stepping through the code, setting a breakpoint etc will occur only for a given processor. If Focus on Group is chosen then the entire group of processors will advance when stepping forward in a program and a breakpoint will be set for all processors in a group. In addition, a user can create new sub-groups of processors by right clicking in the Process Group Window and then dragging the desired processors to the group. Groups can also be created more efficiently using sub-groups from the Parallel Stack View described below. The below image shows 3 different groups of processors, the default All group, a group with only a single master processor Root and a group with the remaining Worker processors.

DDT Groups

Parallel Stack View

A new feature which should help users debug at high concurrencies is DDT's Parallel Stack View window which allows the user to see the position of all processors in a code at the same time from the main window. A program is displayed as a branching tree with the number and location of each processor at each point. Instead of clicking through windows to determine where each processor has stopped, the Parallel Stack View presents a quick overview which easily allows users to identify stray processes. Users can also create sub-groups of processors from a branch of the tree by right clicking on the branch. A new group will appear in the Process Group Window at the top of the GUI.

Parallel Stack View

Memory Debugging

DDT has a memory debugging tool which shows heap memory usage across processors. In order to use memory debugging, a user must link with the following option -Bstaticddt. Memory debugging is fully enabled for C codes and more functionality should be available for Fortran codes soon.

Franklin% cc -g testDDT.c -Bstaticddt
A number of features are enabled with memory debugging. Select Current Memory Usage and Memory Statistics under the View menu to see information about memory usage in an application.


LBNL Home
Page last modified: Fri, 04 Jan 2008 22:23:28 GMT
Page URL: http://www.nersc.gov/nusers/systems/franklin/software/ddt.php
Web contact: webmaster@nersc.gov
Computing questions: consult@nersc.gov

Privacy and Security Notice
DOE Office of Science