Skip to content.

UPR HPCf

Sections
Personal tools
You are here: Home » Members » humberto's Home » Test ZWiki » RunBatch
Views

RunBatch

last edited 6 years ago by humberto

Running Batch Jobs Under PBS/Maui

Full documentation on running batch jobs is up on our web site:

http://www.hpcf.upr.edu/docs/batch/

Here's a heavilly commented PBS script

# Example PBS submission script. For more details/options check man qsub
# 
# All PBS directives start with "#PBS"
# Comments are started with #
# The rest non-blank lines will be executed by PBS as a normal shell
# script
# 
# Name for the job. If not declared, the name for the job will be the
# name of the file containing the PBS script (i.e. this file)
#PBS -N MyJob
#
# Number of cpus this program requests. It's important to tell PBS the
# real number of cpus that the program will use, because PBS schedules
# jobs based on this value. If it's specified incorrectly, processors
# will end up being shared between jobs, i.e. they'll take more than
# twice as long to complete. The default value is 1. 
#PBS -l ncpus=4 
#
# This is the amount of real time the job will run. The default time is
# 15 minutes, and if a job exceeds its requested walltime it'll be killed.
#PBS -l walltime=2:00:00
#
# This lists additional resources required by the job. A list of all 
# supported resources can be found on the man page for pbs_resources_irix
#PBS -l mem=512mb,file=2gb
#
# This lists which program streams will be kept as files in the job's 
# directory. e is the standard error, o is the standard output. The
# streams will be kept in files called {jobName}.{eo}{jobSequence}
#PBS -k eo
#
# Tells PBS the set of conditions under which the PBS server will send 
# an email about the job. The options are:
#  a -> mail is sent when the job is aborted
#  b -> mail is sent when the job begins executing
#  e -> mail is sent when the job terminates
#PBS -m abe 
#
# The list of users to whom mail is sent. The argument is a comma separated
# list of valid email addresses.
#PBS -M myemail@example.com
#
# These are the commands that make up the PBS job. Normal commands are:
# change to the jobs directory and execute the program. 
# PBS jobs by default execute in your home dir, make sure to change
#
cd ~/MyJobDir
mpirun -np 4 -cpr MyJob
#
# To submit job do: qsub {script-name}
# To check its status:
#  qsub -a will list all your current jobs and brief information about their
# status
# * qsub -f {jobname} will give detailed information about job {jobname}
# To erase a job from the queue: qdel {jobId}
# the jobId field is the one reported by pbs with the command qstat

-- Main.RicardoBaratto? - 01 Nov 2000
Main.HumbertoOrtiz - 08 May 2001
 

Powered by Plone

This site conforms to the following standards: