Skip to content The Open University

The Open University
IMPACT Cluster

A joint venture between the Science & MCT faculties


QSUB Examples
qsub -cwd -P project -l (memory/qnames) -p (extra tickets) scriptname.sh
-cwd place -e and -o files in the current working directory
-P see project
-l qname=”not currently needed”,mem_free=g m k etc
-p 1 - 100
Examples of submision scripts
Example parallel script containing all above switches submit with qsub script.sh
#!/bin/sh
# Your job name
#$ -N my-job-name
# Use current working directory
#$ -cwd
# Join stdout and stderr
#$ -j y
# which parallel que to run in and how many cpu's
#$ -pe orte 4
#Run int this project
#$ -P science
# job run time hours:min:sec (always over estimate )
#$ -l s_rt=25:00:00
# Run job through bash shell
#$ -S /bin/bash
# The following is for reporting only. It is not really needed
# to run the job. It will show up in your output file.
echo "Got $NSLOTS processors."
echo "Machines:"
cat $TMPDIR/machines
export PATH=/sge/open-mpi-64/bin/:$PATH
export LD_LIBRARY_PATH=/sge/open-mpi-64/lib:$LD_LIBRARY_PATH
#start a parallel job using mpirun with ring_f90
/sge/open-mpi-64/bin/mpirun --prefix /sge/open-mpi-64 -np $NSLOTS ring_f90
Example single job script containing all above switches submit with qsub script.sh
#!/bin/sh
# Your job name
#$ -N my-job-name-this-time
# Use current working directory
#$ -cwd
# Join stdout and stderr
#$ -j y
#Run in this project
#$ -P mct
# job run time hours:min:sec (always over estimate )
#$ -l s_rt=25:00:00
# Run job through bash shell
#$ -S /bin/bash
myjob
Other job script examples from users
Rob Farmer's batch and IDL scripts
Geoff's trickle job submision script