Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As in the example above, once connected to GALILEO100 with RCM,  open a terminal (start -> terminal). Then follow this set of instructions described below.  

1) Setup the .tvdrc file - only the first time

The first time you estabilish a Totalview session, a folder named .totalview will be created in your $HOME (it is not visible with the standard "ls" command, you have to add the flag -a for the hidden directories and files). Inside it, create a text file named .tvdrc, that should contain the following lines documented also in the official Slurm manual:

dset -set_as_default TV::bulk_launch_enabled true
dset -set_as_default TV::bulk_launch_string {srun --mem-per-cpu=0 -N%N -n%N -w`awk -F. 'BEGIN {ORS=","} {if (NR==%N) ORS=""; print $1}' %t1` -l --input=none %B/tvdsvr%K -callback_host %H -callback_ports %L -set_pws %P -verbosity %V -working_directory %D %F}
dset -set_as_default TV::bulk_launch_tmpfile1_host_lines {%R}

2) Prepare the job (job.sh script)

#!/bin/bash

#SBATCH -t 30:00
#SBATCH -N 1
#SBATCH -o totaljob.out
#SBATCH -e totaljob.err
#SBATCH -A <your_account>
#SBATCH -p g100_usr_prod
 
module load autoload
module load totalview
export DISPLAY="hostname:nr"
totalview
tvconnect srun ./your_executable

...

3) Submit the job

>sbatch job

...

.sh

4) Open a Totalview terminal

In the RCM shell, load the module of Totalview and launch "totalview" to open the GUI. When the job starts, you will be asked by a prompt to connect to it and you will see that the tool is trying to debug the "srun" command.

5) Launch the simulation

Press the green "Go" button to launch the simulation. Eventually, a prompt will ask you if you want to stop the parallel job: if you choose "Yes", you will finally see the main code of the executable you want to debug and you can start working on it.

Submit the job and the Totalview interface will pop up in the RCM session.

...



PS: In a terminal opened inside RCM, the shortcut to paste text copied elsewhere is "Ctrl+Shift+Insert"

...