Using Allinea DDT
Tutorial contributed by Fengming Yuan. Note: User-provided tutorials are not supported by CADES.
Allinea Forge/DDT Client
I. Allinea DDT Client
The Client software is free from: https://www.allinea.com/products/forge/download#remote-client.
The version for matching with CADES’ server-end is 6.0.6 (Currently).
II. Configuration of Remote Server
Currently, CADES has 2 versions of Allinea DDT/Forge, the following is tested with v.6.0.6
II-1. Start Allinea Forge Client locally
Allinea Forge/DDT Client application installed ......
On your screen .......
II-2. Configure Remote Launching
Drop-down configure ......
Add or Modify ......
Remote Launch Settings......
AND, ......
II-3. DDT template on CADES
You have to configure a DDT template file, to be used by Allinea Forge Client, as following:
e.g., here a file named as ddt_template.qtf
, which MUST be put in your home directory.
#
# Name: Generic Torque
#
# WARNING: If you install a new version of Allinea Forge to the same
# directory as this installation, then this file will be overwritten.
# If you customize this script at all, please rename it.
#
# submit: qsub
# display: qstat
# job regexp: (.+)
# cancel: qdel JOB_ID_TAG
# show num_nodes: yes
#
# WALL_CLOCK_LIMIT_TAG: {type=text,label="Wall Clock Limit",default="00:30:00",mask="09:09:09"}
# QUEUE_TAG: {type=text,label="Queue",default=debug}
## Allinea Forge will generate a submission script from this by
## replacing these tags:
## TAG NAME | DESCRIPTION | EXAMPLE
## ---------------------------------------------------------------------------
## PROGRAM_TAG | target path and filename | /users/ned/a.out
## PROGRAM_ARGUMENTS_TAG | arguments to target program | -myarg myval
## NUM_PROCS_TAG | total number of processes | 16
## NUM_NODES_TAG | number of compute nodes | 8
## PROCS_PER_NODE_TAG | processes per node | 2
## NUM_THREADS_TAG | OpenMP threads per proc | 4
## DDT_DEBUGGER_ARGUMENTS_TAG | arguments to be passed to ddt-debugger
## MPIRUN_TAG | name of mpirun executable | mpirun
## AUTO_MPI_ARGUMENTS_TAG | mpirun arguments | -np 4
## EXTRA_MPI_ARGUMENTS_TAG | extra mpirun arguments | -x FAST=1
#!/bin/bash
#PBS -S /bin/bash
#PBS -m ae
#PBS -j oe
#PBS -M yuanf@ornl.gov
#PBS -N acme_debug
#####PBS -q QUEUE_TAG
#PBS -q batch
#PBS -l nodes=NUM_NODES_TAG:ppn=PROCS_PER_NODE_TAG
#PBS -l walltime=WALL_CLOCK_LIMIT_TAG
#PBS -W group_list=cades-ccsi
#PBS -A ccsi
#PBS -l qos=std
#PBS -l naccesspolicy=singlejob
export OMP_NUM_THREADS=1
#PBS -V
#PBS -o PROGRAM_TAG-ddt.output
#PBS -e PROGRAM_TAG-ddt.error
## The following line will use exactly the same default settings that
## Allinea Forge uses to launch without the queue.
module load env/cades-ccsi
module load vasp
AUTO_LAUNCH_TAG
## Replace the above for more complex situations - such as for passing unusual
## parameters to mpirun, like machine files or processes per node -- below is
## an example.
##
## if test "MPI_TAG" = "mpich 1 standard" ; then
## MPIRUN_TAG -tv -np NUM_PROCS_TAG PROGRAM_TAG PROGRAM_ARGUMENTS_TAG
## else
## if test DEBUG_STARTER_TAG -eq 1 ; then
## DDT_CLIENT_TAG MPIRUN_TAG -np NUM_PROCS_TAG -machinefile $PBS_NODELIST PROGRAM_TAG PROGRAM_ARGUMENTS_TAG
## else
## MPIRUN_TAG -np NUM_PROCS_TAG -machinefile $PBS_NODELIST DDT_DEBUGGER_TAG PROGRAM_ARGUMENTS_TAG
## fi
## fi
NOTE:
(1)Please modify user information and others as NEEDED; (2) TIP: # or ## implies comments, EXCEPT for #PBS
III. Step-by-Step Instruction on Debugging
III-1. Start 'Run and debug a program'
While 'Remote Launch: cades' is chosen, click "Run and debug a program" under "RUN" ......
input your pwd, and ENTER ......
III-2. Configure Allinea DDT job-submission to CADES
After successfully connecting to CADES, the following will pop up. THEN, you may add or edit a job-submission configuration
IMPORTANT: if this is your first time to access CADES for submitting a job to run & debug, you MUST Click 'Configure...' under 'Submit to Queque'. And then add the above template *.qtf file (in your home directory) and other settings, AS Following: .......
NOTE: This 'configuration' Window also can be used to configure other settings, as SHOWN. You may want to have some inspections by clicking each one*
III-3. Submit job and Run
AFTER clicking 'SUBMIT' button ......
ONCE your job status is as "R", WINDOW will be switching and showing as ......(OTHERWISE, the above window would be hanging on)
WHEN all requested Processes (e.g. here 64/64) connected and ready, the window will be changing into the run/debug views as FOLLOWING, and PAUSE at the main program entry point (usually)......
III-4. Debug The Program
PAUSE at Breakpoint(s)
CHECK variables: current line or locals for current subroutine, OR do what you want ......
HIT a BUG, ......(NOT SO FUN?)