Documentation: Linaro (ARM) DDT
Linaro DDT (formerly ARM DDT) is a powerful GUI-based parallel debugger. It is part of the Linaro Forge suite of parallel tools, alongside Linaro MAP and Linaro Performance Reports.
The focus of this page is on setting up and running DDT, rather than the useful features of DDT. For an overview of parallel debuggers, with a focus on DDT and its capabilities, see our parallel debugging overview page. For links to in-depth tutorials and guides on DDT, see our resources section. For help setting up ARM DDT, contact HPC help
In order to effectively use any debugger on compiled code, including DDT, we must compile with the -g flag and, preferably, with the -O0 optimization flag.
The -g flag produces debugging information.
The -O0 optimization flag ensures that no variables or functions get optimized out, which simplifies debugging.
An example compile including the proper debug flags might look like:
mpicc -O0 -g application.c -o application.exe
DDT involves working with a GUI. Thus, we first need to connect to the cluster in a way that supports fast and efficient visualization of applications.
To do this, we’ll use the FastX application. Follow the instructions on the FastX page to set up the application and connect to the cluster.
Once we’re connected to the cluster via FastX, we want to open a terminal inside FastX and initiate an interactive session:
salloc --nodes=1 –account=<your account handle> --time=1:00:00
Then, once the interactive session launches, load the arm module:
module load arm
Next, make sure that you have loaded any additional modules that you need to run your application.
Finally, launch DDT by typing ddt or vglrun ddt. This will launch the DDT GUI. From the GUI, click the run button. This will generate a box that allows you to specify the path to the executable and your working directory and choose how many tasks and threads to run your application with, among other settings.
!!! note
There are multiple ways to launch DDT. If your job will take a long time to run, it may be better to submit a job that launches DDT in offline mode. To do this, open DDT in GUI mode, set the desired debug points and save the sessionfile (mysession.session). Then, submit a job with the following command:
`ddt --offline --session=<YOUR SESSION FILE.session> <other flags> -o <NAME of OUTPUT FILE.txt.html> ./executable`
This will produce a debugging report you can read when the job completes
Be sure to set your working directory and application directory correctly:
In this example, the application to debug is the epsilon executable of BerkeleyGW (epsilon.cplx.x). The development version of this code that we wish to debug can be found in /projects/scatter/OH/BerkeleyGW/bin. Be sure to set this Application line correctly. We want to run a particular BerkeleyGW calculation out of the /projects/scatter/OH/GaN/eps_ff directory, which contains all of the input files needed for BerkeleyGW to execute properly. Be sure that your Working Directory is set correctly.
Next, we want to choose how many MPI tasks to launch the application with, and provide any additional arguments to srun:
Finally, you can set the number of OpenMP threads to launch, among other options, by checking the corresponding boxes (OpenMP, CUDA, Memory Debugging, etc.).
Then, click the “run” button. A window will appear that states “listening for your program.” When DDT is done listening, it will show a “paused” view of your source code. From here, you can add break points, etc. When you’re ready to run the program again, click the green triangle towards the top left corner.
- Compile your code with the
-gand-O0flags - Connect to the HPC machine via the FastX program
- Launch an interactive session on the HPC machine with salloc
- Launch DDT with the command
vglrun ddtorddt - Provide DDT the path to the executable and the path to your working directory
- NERSC has an excellent in-depth DDT tutorial here
- See these slides for a high-level overview of the Linaro Forge toolkit, including DDT
- See this tutorial for a user-friendly walkthrough of DDT

