Debugging with DDT
DDT is a symbolic, parallel debugger that allows graphical debugging of MPI applications. DDT does support threads, but this requires additional manipulation of the “template” job script.
Code Preparation
Before running with any debugger, go to your application directory and re-compile your code with -g -O0. For example:
login3% mpif90 -g -O0 debug_code.f90
System Preparation
For Ranger, please follow these steps to set up and your environment:
- Make sure that X11 forwarding is enabled when you ssh to Ranger. Use the -X option on the ssh command line if X11 forwarding is not enabled in your ssh client by default.
To test, login to Ranger and check the display back to your workstation. If a clock appears on your screen when you execute "xclock", then X11 forwarding is working. Here is the general command line syntax to use with ssh, from a UNIX/Linux system:
% ssh -X ranger.tacc.utexas.edu
- DDT is installed only on the frontend nodes. While logged in, load the ddt module file as follows:
login4% module load ddt
Configuring DDT
- With the DDT module loaded in addition to all other modules needed to run your program (a.out in the example below), start the DDT debugger as follows:
login4% ddt ./a.out
- Click the "Run and Debug a Program" button in the "DDT – Welcome" window.
The DDT Welcome window 
- This displays the "DDT-Run" window, where you specify the executable path, command-line arguments, and processor count. Once set, they remain from one session to the next.
The DDT Run window 
- Select each of the "Change" buttons in this window, and adjust the job parameters, as follows:
- For the "Options" change button, set the MPI Implementation to either "mvapich 1" or "mvapich 2", depending on which mpi software stack you used to compile your program. Click OK.
The DDT Options window 
- For the "Queue Submission Parameters" window, fill in the following: Queue (development is the default queue, and it has fast turnaround, use the normal queue for more than 256 cores); Time (hh:mm:ss); and Project to charge. You must set the Project if you are assigned more than one. When you login, there is a list of the projects associated with your account. Click OK, and you will return to the "DDT-Run" window.
The DDT Queue Submission Parameters window 
- For the "Options" change button, set the MPI Implementation to either "mvapich 1" or "mvapich 2", depending on which mpi software stack you used to compile your program. Click OK.
- Back in the "DDT-Run" window, set the number of cores you will need in the "Number of processes" box (if you are not using a multiple of 16, see instructions below).
- Finally, click "Submit". A "DDT-Job Submitted" status box will appear.
Running DDT
When your job runs, the status box will disappear. Double click on line numbers to set break points, and then click on the play symbol (>) in the upper left corner to start the run.
| The DDT Session window | |
![]() |
|
The status of a queued job is updated in this window. When your job is launched by the SGE scheduler, the DDT GUI will fill up with a code listing, stack trace, local variables and a project file list.
Advanced Use
See the DDT User Guide for details on navigating around the GUI, managing the job, and viewing data.
If you need to run a hybrid code and/or use a number of cores that is not divisible by 16 (the number of cores on a node), please contact TACC support. To do that, you will need to create your own template, similar to the one in your ~/.ddt directory, config.ddt. Here are general instructions for creating a custom template:
Look in your .ddt directory and find the ddt configuration file called "config.ddt". In that file, find the section that looks like this:
| [queue] use queue = yes template file = /opt/apps/ddt/ddt-2.2/templates/sge.qtf |
The sge.qtf file is the job submission script config.ddt tells DDT to use. Either copy that script to your home directory so you can change it and modify config.ddt to use your modified script, or change config.ddt to use a different job submission script.



