Sun Grid Engine (SGE)


Environment setup

To set up your environment you need to execute this on the command line or put in your environment

tcsh/csh

source /nfs/sge/current/default/common/settings.csh

bash

. /nfs/sge/current/default/common/settings.sh

Status of jobs

To check the status of jobs you can visit http://blast.cs.unm.edu/gemonitor/.

Basic commands

qsub

Submits a background job. Example:

qsub -N "jobname" /tools/hw/wrap make test
+ Qsub requires command to be a script
+ Output goes to <jobname>.o<jobnumber>

Please note:
The SGE system will use /bin/csh to execute the shell scripts regardless of the shell specified at the top. If you are using an alternate shell, use the -S to specify the shell e.g.

#$ -S /bin/bash

instead of

#!/bin/bash

qbsub

Submit a binary background job. This is a wrapper script to qsub that does away with the necessity to use scripts. Example:

qbsub make OPT=1234 my_target

qrsh

Submit foreground job. Example:

qrsh make test

qstat

Check status of jobs. Examples:

qstat # Checks status of all jobs
qstat -u user # Checks status of user's jobs
qstat -r Show resources being used
qstat -j jobnum Details of 1 job

qdel

Delete a job. Example:

qdel 2345   # Kills job 2345

qmon

Interactive interface to entire SGE system. Example:

qmon &

Advanced options

If you need to pass your environment to the Queuing system use the -V flag ie.

qsub -V ./job.sh

For example if you set a specific LD_LIBRARY_PATH that you want passed to your scripts -V is the way to go.

If you need to put the .o and .e files somewhere else other than your home directory add -e and -o flags ie.

qbsub -o $PWD -e $PWD mystuff

This will put both .o and .e files in whatever the present working directory is.

- To send a job to a particular machine use the -q flag ie.

qsub -q shelby.q,io.q,rhea.q script.pl

Will dispatch the job only to shelby, io or rhea (in that particular order)

Request a particular resource ie. machine job needs to run on has to have at least 800 MB of memory use the -l flag ie.

qsub -l mem_total=800 script.pl

or if you need to run a job on MacOS X only do

qsub -l arch=darwin

You could also use glinux for x86 version of Linux and lx24-amd64 for AMD64 architecture ie. AMD Opteron or Athlon64.