Debugging with Forge DDT

Linaro Forge DDT, which is part of Linaro Forge is a powerful, easy to use graphical debugger.

With Linaro Forge DDT, it is possible to debug

  • Single process and multithreaded software

  • Parallel (MPI) Software

  • OpenMP

  • Hybrid cores mixing paradigms such as MPI + OpenMP or MPI + CUDA

Linaro Forge DDT supports

  • C, C++, and all derivatives of Fortran, including Fortran 90

  • Python (CPython 2.7), limited support

  • Parallel languages/models including MPI, UPCm, Fortran 2008 Co-arrays

The documentation on this page will help you set up DDT to debug on the RDHPCS system. Please refer to the Linaro Forge DDT documentation for information on using DDT.

DDT remote connection

Since DDT is a graphical debugger, interactions over a wide area network can be extremely slow. To make running DDT on remote systems easier, DDT has the ability to use a locally running client to connect to a remote system.

Download and install Linaro Forge.

Important

The version of the local client must match the version of Forge on the RDHPCS system. You may need to download and install an older Linaro Forge version.

Note

You will need to have an SSH connection open, with the local port forward active to use this method.

Linaro Forge remote connection configuration

Enter the remote connection configuration for Linaro Forge. You must have a working local forward port established to the remote RDHPCS system.

In the locally running client:

  1. Click the Remote Launch dropdown ‣ Configure

  2. In the Configure Remote Connections dialog, click Add.

  3. Enter the details of your remote host:

    Connection Name

    Enter a name for you remote connection.

    Host Name

    Enter First.Last@localhost:<port>, where <port> is your local forward port number.

    DDT path for Remote Installation

    Run sh -c 'dirname $(dirname $(command -v ddt))' on the RDHPCS system, and copy the returned path.

    Proxy through login node

    Ensure the checkbox is selected.

  4. Click OK, then close the Configure Remote Connections window.

  5. Click the Remote Launch dropdown and select your configuration.

  6. Enter your PIN+passcode. On RDHPCS systems other than gaea, you can use SSH key authentication.

There are other ways to start Forge DDT. We find the remote connection gives the best user experience on the RDHPCS systems. If you decide to run Forge DDT directly on the RDHPCS system, you will likely want to use a remote desktop environment, like the X2Go Remote Desktop. Please refer to the Linaro Forge connecting to a remote system documentation for more information.

Debgging an MPI process

First time configuration

Linaro Forge's system settings window.

Linaro Forge’s system settings dialog. This is where the user will set the MPI implementation.

If this is the first time you will debug an application on this remote system, you will need to set some configuration options. To do this, click the Run and debug a program option to open the run dialog window. Click the options button in the lower left.

Select system. In the systems settings area, use the MPI/UPC implementation drop down menu and select SLURM (generic).

Linaro Forge has the ability to submit a Slurm job. To allow this, first download correct queue template file for the given system, and place it on the remote RDHPCS system:

Please review the downloaded queue template file. You may need to modify it to ensure the correct modules are loaded for your application to run.

Note

You can use curl on the remote system to download the queue template file. Copy the link address for the file, and run:

$ curl -o slurm.qtf <past_url_link>
Linaro Forge's job submission settings window.

Linaro Forge’s job submission settings dialog. This is where the user can set the queue template file and other job submission information.

With the Slurm template file on the remote system, in the Linaro Forge run dialog window select guilabel:job submission. In the job submission settings area, in the submission template file box, enter the full path to the slurm.qtf file you downloaded. Alternatively, you can click on the file icon () and navigate to the Slurm template file. The other Slurm items will be updated whith the Slurm template file. Ensure the quick restart option is selected.

Finally, select Ok to close the settings.

Note

You can learn about the Linaro Forge DDT options in the Forge configuration documentation.

Submit a debug job

Linaro Forge run dialog

The Linary Forge run dialog box. This is where users will select the MPI type (Slurm), number of processors, and the queue submission information.

In the DDT client window, select Run and debug a program. This will bring up the run dialog window.

In the run dialog window, expand the application section and in the applicatoin text box enter the path to the executable or use the file icon () and navigate to the executable. In the working directory text box, you should also enter the full path to the directory from where the debug job should be run.

Select the MPI section. Enter the total number of MPI processes, and the number of nodes required. If needed, change the MPI implementation and add any additional srun arguments to run your application.

Important

Ensure the number of processes and the number of nodes required for that many processes is correct for the RDHPCS system and partition. You can set the processe per node option with the correct number of processes per node, and the link button () to automatically set the correct number of required nodes.

If debugging a hybrid MPI+OpenMP applicaiton, select the OpenMP and enter the number of OpenMP threads. Please note you may need to use the MPI implementation Slurm (MPMD) if debugging an MPI+OpenMP application.

Select the submit to queue section. If you haven’t already configured DDT to lauch Slurm jobs, please refer to First time configuration. Click the parameters button to verify the Slurm submit settings.

Verify all the settings are correct, and click the submit button. Forge will submit your job to the Slurm scheduler and wait for the job to start. Once the job starts, Forge will attach to the running application. At this point, you can use Forge to debug your application.