HPMC User Guide v 1.00
© 2026 Bassem W. Jamaleddine
GNU DDD (Data Display Debugger) is a graphical front end for the command-line debuggers GDB. DDD is a graphical user interface (using the Motif toolkit) for the command-line debugger GDB.
To use ddd, you must edit the file ddd's init file (~/.ddd/init) and add
the following as the first line:
Ddd*rshCommand: ssh -t
the following as the first line:
Ddd*rshCommand: ssh -t
The following figure shows the first line of ~/.ddd/init on the HPMC for the root user.
The diffusion_base.c is an OpenMP program that we compile to be offloaded to the MIC. For the program to be debugged with GNU GDB, the option -ggdb must be included. In addition the $ORIGIN must be specified for the RPATH.
![]()
# icc -ggdb -openmp -O3 -std=c99 -mmic diffusion_base.c -o diffusion_base_xphi_O3g -Wl,--rpath='$ORIGIN'
When compiling an OpenMP program for the MIC, include the following two
options: -ggdb -Wl,--rpath='$ORIGIN' to make sure it can debugged with ddd.
The following command invokes the ddd debugger on the program diffusion_base_xphi_O3g.
options: -ggdb -Wl,--rpath='$ORIGIN' to make sure it can debugged with ddd.
# ddd --host root@mic0 --no-exec-window --debugger gdb diffusion_base_xphi_O3g
You can also type the following at the command prompt to start debugging
# xphiddd /MIC_PROG/TESTDDD/diffusion_base_xphi_O3g
The xphiddd is available in your /tools directory, the following listing shows its contents.
1. #!/usr/bin/perl 2. use strict; 3. print " $0 must be followed by xphi program name\n" unless @ARGV == 1; 4. my $prog = shift @ARGV; 5. print " Cannot read $prog\n" unless -r $prog; 6. 7. system("ddd --host root\@mic0 --no-exec-window --debugger gdb $prog");
The following figure shows the ddd front end to the GNU GDB to debug the diffusion_base_xphi_O3g program.