High Performance Computing

Serial Jobs

Simple jobs requiring one processor are serial jobs and can be submitted to SGE using qsub. You must supply a shell script which at its simplest will simply call an executable file:

qsub hello.sh
You can specify resources, such as maximum amount of elapsed time. For example:
qsub -l h_rt=3600 run.sh
qsub -l h_cpu=1800 test.sh
to allow a maximum of 3600 seconds to job run.sh or 30 minutes to job test.sh. The built-in complexes h_rt (hard real time) and h_cpu (hard cpu time) are used here. The most useful resources for the Nottingham system are described in the Commands. queues and resources section of this guide.

Typically, a submission script would be written as a 'bash' script, which should start:

#! /bin/bash
It is highly recommended to include on the second line of the script:
#$ -V -cwd
A line starting #$ is ignored by all scripting languages but is interpreted by SGE as flags sent to the SGE qsub command. In this case the flag -V instructs SGE to use the environment in force when the job was submitted (e.g PATH, LD_LIBRARY_PATH etc) when the job runs on one or more of the compute nodes. Without the -V flag, all the local settings will be lost when the job runs. This is especially important if you modified your environment using Environment Modules. The -cwd flag instructs SGE to run the job script in the same directory that you were in when you submitted the job. Without the -cwd flag the job will start running in the users home directory, which in almost all cases will be incorrect. Here is a simple job script called test.sh :

#! /bin/bash #$ -V -cwd echo This script is running on node hostname echo The date is date sleep
To submit the job simply qsub it:
~/benchmarks> qsub test.sh
Your job 698 ("test.sh") has been submitted