How do I use a graphical debugger when running a specific task in a rose cylc (or stem) suite on Gadi?

How do I use a graphical debugger such as totalview or DDT when running a specific task in a rose cylc (or stem) suite on Gadi?

See access/TotalviewCylc – Access Development

I think @SeanBryan51 had already found that page, so was there something missing in that documentation? Or was it out of date @SeanBryan51?

(Just want to make sure there is a solution to the query if others search for the same problem)

I managed to get DDT to work but not TotalView unfortunately.

Turned out using DDT was straight forward as per Martins notes. I have put here the steps to run a specific task in a rose stem suite with DDT:

  1. Find the task you want to debug in the cylc runtime section.
  2. Add the pre-script setting to the task to specify which additional modules to load (the arm-forge module is required to use DDT).
  3. Set environment variables ROSE_LAUNCHER = ddt and ROSE_LAUNCHER_PREOPTS = --connect mpirun -n $NPROC where NPROC is an environment variable equal to the number of processors required.
  4. Start DDT on Gadi and run the rose suite. Wait for the reverse connection message.

For example, to use DDT for the following task I have the following:

         inherit = NCI_INTEL_LOOBOS
         pre-script = """
            module load openmpi/4.1.4
            module load arm-forge
             ROSE_LAUNCHER = ddt
             ROSE_LAUNCHER_PREOPTS = --connect mpirun -n $NPROC
             ROSE_TASK_APP = loobos_gl4

Here NPROC is inherited from the NCI_INTEL_LOOBOS task.

Where does one find the reverse connection message?

(Also feel free to mark your own reply as the solution)

A window will appear in the GUI prompting you to accept the reverse connection.