Debugging your Code


The following debugging tools are currently installed on Guillimin, and are currently supported by us and corresponding vendors:

Using Allinea DDT

The Allinea DDT parallel debugger is an excellent third-party product, supporting practically all compilers and MPI packages. Please see this excellent brief tutorial on how to start using DDT debugger.

To access the DDT debugger on Guillimin please first setup the environment using "module add DDT" (default is version 3.1. For version 3.2 use "module add DDT/3.2").  The tool can then be started simply by typing the command "ddt".  Since it is a graphical tool, please be sure to enable X11 window forwarding for your ssh connection. On Mac and Linux systems, this can be done with the "-X" flag to ssh when connecting to Guillimin. X11 forwarding on Windows is most often handled with putty and Xming.

Configuring DDT

When you start DDT, a default configuration file will be created. You may need to configure some of the options (Menu Toolbar > Session > options ...) before using DDT for your code. For example, if you use an MPI implementation besides mvapich2, you must make an appropriate change in the options. You may also want to select a different queue than the default (debug).

To reset the configuration, remove or rename the file "config.ddt" in the ~/.ddt directory and relaunch DDT. The default configuration file will be copied into your ~/.ddt directory the next time you start ddt.

Attach to Running Processes

In addition to being able to submit jobs directly to the queue, DDT can also attach to running processes. To do this, you must first list the nodes that your process is running on in the file ~/.ddt/nodes. We have a script for doing this automatically. For example, if your jobid is 999999:

$ module add DDT
$ ddt_gen_nodelist 99999999
New DDT nodelist created
$ ddt &

You may now select 'attach to a running program' from the DDT menu and DDT will automatically begin scanning the nodes for your program. You may have to fill in the box 'Filter for process names containing:' with the name of your program.