Personal tools
You are here: Home User Support User Documentation DESHL 5 Running real applications

5 Running real applications

The tutorial in Chapter 4 showed how to submit a simple, single processor job. In general it is assumed that DESHL users want to run real applications requiring multiple processors and large amounts of memory.  The example below shows  a job submission script to run an executable script on an execution host. The executable script initialises the DEISA environment on the execution host, then copies application data into the DEISA_SCRATCH area. The parallel application is invoked, then, after the application has finished running, an output file is copied from DEISA_SCRATCH back to DEISA_DATA.

The job submission script:

#!/bin/bash
#SAGA JobDefinition based directives:
#$ SAGA_HostList = unicore.grid.sara.nl_4014_SARA-HUYGENS
#$ SAGA_FileTransfer = $DEISA_HOME/jobs/userapp.sh > userapp.sh 
#$ SAGA_JobCmd = userapp.sh 
#$ SAGA_Memory = 65536 
#$ SAGA_JobName = Example job running on 128 processors 
#$ SAGA_NumCpus = 128 
#$ SAGA_WallClockSoftLimit = 43200

The executable script (userapp.sh):

 

#!/bin/bash
#userapp.sh
#initialise the DEISA environment on the execution host
module load deisa
#copy the application’s input data to DEISA_SCRATCH
cp $DEISA_DATA/inputfile1.dat $DEISA_SCRATCH/inputfile1.dat 
cp $DEISA_DATA/inputfile2.dat $DEISA_SCRATCH/inputfile2.dat
#change directory to DEISA_SCRATCH
cd $DEISA_SCRATCH 
#run the parallel app 
$CPMD
#copy the generated data back to $DEISA_DATA
cp $DEISA_SCRATCH/bigdatafile.dat $DEISA_DATA/bigdatafile.dat

The job submission attributes are described in detail below:

5.1 Execution host

The execution site for the job is specified via the SAGA_HostList attribute, for example:

#$ SAGA_HostList = unicore.grid.sara.nl_4014_SARA-HUYGENS

5.2 Executable

The actual executable application or script to be run is specified via the SAGA_JobCmd attribute.  For example,

#$ SAGA_JobCmd = userapp.sh

5.3 File transfer

Any data or executables required for the job to run successfully can be staged into the job’s USPACE using SAGA_FileTransfer attributes.

To transfer a file into the USPACE before the job is executed:

#$ SAGA_FileTransfer = $DEISA_DATA/inputdata/inputdata1.dat > inputdata1.dat

To transfer a file out of the USPACE once the job has completed:

#$ SAGA_FileTransfer = $DEISA_DATA/outputdata < outputdata.dat

5.4 Number of Processors

The number of requested processing elements is controlled via the SAGA_NumCpus attribute. For example

#$ SAGA_NumCpus = 128  

5.5 Memory

This is requested via a SAGA_Memory attribute. Normally this is interpreted as the total amount of memory in MBytes. If this is not specified, the default memory for the job will be set by the site where the job is submitted. For example

#$ SAGA_Memory = 8192

5.6 Wallclock Runtime

The requested amount of time that the job will need can be specified using a SAGA_WallClockSoftLimit attribute. This specifies the maximum amount of total processing time that the job will require, in seconds. If this is not specified, the default total time for the job will be set by the site where the job is submitted. For example

#$ SAGA_WallClockSoftLimit = 32000 

5.7 Command line arguments

Values can be passed to an application as if they appeared on the command line for the application. This is done by specifying with SAGA_JobArgs attributes. For example

#$ SAGA_JobArgs = -d –v
#$ SAGA_JobArgs = -f filename.dat

5.8 Environment Variables

Environment variables can specified so that they appear in the environment of the executing application. These are specified via SAGA_JobEnv attributes. For example

#$ SAGA_JobEnv = OMP_NUM_THREADS=8

#$ SAGA_JobEnv = fieldValue=0.09

5.9 Job Name

Descriptive information for the job can be specified via a SAGA_JobName attribute. This is displayed with other job information during a status command, and can be useful for identification when the user has a large number of submitted jobs running at a site. For example

#$ SAGA_JobName = QCD input parameter file 98789.dat 
Document Actions