Batch Compute Jobs
Job Submission Scripts
# template.qsub: Example job submission script
# This is a comment.
# Lines beginning with the # symbol are comments and are not interpreted by
# the Job Scheduler.
# Lines beginning with #$ are special commands to configure the job.
### Job Configuration Starts Here #############################################
# Run the job in the current working directory (Don't change this)
#$ -cwd
# Run this job in the normal Bash shell environment (Don't change this)
#$ -S /bin/bash
# Export all current environment variables to the job (Don't change this)
#$ -V
# Parallel environment and number of CPU cores
# Syntax -pe
<
parallel_environment
>
<
cpu_cores
>
# Possible values include:
# threaded - for shared-memory jobs running on a single compute node
# orte - for multi-node jobs using OpenMPI
# CPU cores: 1-32 for parallel jobs this should match what you pass to
# mpirun below
#
# In this example we request 1 CPU core on a single compute node
#$ -pe threaded 1
# Job name - this will show up in the output of the qstat command
# Don't use spaces or special characters
#$ -N myjob
# Output file name - all regular output goes to this file instead of the screen
#$ -o myjob-out.txt
# Error output file name - all Job Errors are written to this file
#$ -e myjob-err.txt
# Send email upon job end/abort/suspend to the specified address
# Possible values for -m are:
# 'b' Mail is sent at the beginning of the job.
# 'e' Mail is sent at the end of the job.
# 'a' Mail is sent when the job is aborted or rescheduled.
# 's' Mail is sent when the job is suspended.
# 'n' No mail is sent.
# Fill in your email address and uncomment the line below to enable email
##$ -M jsmith@email.com -m eas
### Commands to run your program start here ####################################
# Set up environment
# Examples:
# source /share/apps/nwchem/env.sh
# source /share/apps/qiime/env.sh
# source /share/apps/openmpi/env.sh
# Run your program(s)
# NOTE: CPU count passed to "mpirun -np" must match the number erquestred via
# the -pe parameter above.
# Examples:
# mpirun -np 4 nwchem myfile
# mpirun -np 16 /share/apps/mrbayes/mb-multi myfile.nex
# python myscript.py
echo "Hello, World!"Monitoring Batch Jobs
Canceling a Job
Example Batch Jobs
Elephant
Parallel processor NWChem
Last updated