How to: Understand SGE Batch Queuing


Instructions

SGE Batch Queue

NOTE: No user jobs are allowed (testing/production) on frontend under any circumstances.

Hrothgar uses the SGE queuing system. All jobs which run more than two minutes and all multiprocessor jobs should be submitted to SGE.

Instead of an interactive command like:

./myjob

use:

qsub job_script

EXAMPLE: qsub test.sh

The components of this command are:

* qsub : submit to the SGE system

test.sh -> job_script: is not the actual job but the script that runs the user jobs.

Usually, you will want to use a command script with qsub. The sample/test command script for the previous example would be:

#!/bin/sh[or tcsh]
#$ -V[Use current environment setting in batch job]
#$ -cwd[Use current directory as the job"s working directory]
#$ -S /bin/bash[Use shell as shell for the batch session]
#$ -N testjob[Names the job job_name]
#$ -o $JOB_NAME.o$JOB_ID[Direct job output to output_file]
#$ -e $JOB_NAME.e$JOB_ID[Direct job error to error_file]
#$ -q normal[Submits to queue designated by queue_name]
#$ -pe fill 8[Executes job via the Parallel Environemnt]
hostname 

For the detailed tutorial download this tutorial: HPCC-Hrothgar-Submitting and Running Jobs.pdf