Job Submission Cheat Sheet

Basics

Simple jobfile.sge:

#!/bin/bash
./run_my_program

With directives, jobfile.sge:

#!/bin/bash
#$
./run_my_program

Execute with the command:

qsub jobfile.sge

 

Run Job from the Current Directory

#$ -cwd

  • Runs job and puts output files in the directory where the job was submitted from\
    • Instead of running in the users home directory, which is the default

Multiple Node Parallel Jobs

#$ -pe Common.pe <# CPUs>

Single Node Parallel Jobs/ Exclusive Node Access

#$ -pe SharedMem.pe

  • Request multiple processors on a single node
  • Request exclusive access to a single node (as in jobs requiring massive memory)

Specific Resource Requests

Memory

#$ -l mem_total=7000M

Or

#$ -l mem_total=7G

  • Request a node with at least 7 Gigabytes of RAM.
  • Note, do not ask for 8Gigs of RAM, as the 8 Gigabytes nodes will actually report 7871 Megabytes of RAM.

Network

#$ -l ge=TRUE

  • Request nodes that have Gigabit network connection (as opposed to 10/100)

Modify Output Files

Ignore Output

#$ -o /dev/null
#$ -e /dev/null

Or

#$ -j y
#$ -o /dev/null

  • Does not record standard out and standard error streams (useful for jobs that produce excessive logging).

List of Complex Values (specified with -l)

arch
num_proc
mem_total
swap_total
virtual_total
load_avg
load_short
load_medium
load_long
mem_free
swap_free
virtual_free
mem_used
swap_used
virtual_used
cpu
np_load_avg
np_load_short
np_load_medium
np_load_long