Qsub

From Nuclear Physics Group Documentation Pages
Revision as of 20:54, 11 September 2009 by Aduston (talk | contribs)
Jump to navigationJump to search

qsub is a Linux command-line based utility available on Endeavour which can be used to submit executable scripts to the PBS system.

Usage

The basic syntax for qsub is

[user@endeavour:~]$ qsub [options] [file]

Where [file] is the path to the executable script you want to submit to the PBS queue. If the command executes successfully qsub will return a job ID to standard output. For example:

[user@endeavour:~]$ qsub script.sh 
 592.endeavour.farm.physics.unh.edu
[user@endeavour:~]$

Options

Options can be entered in the command line normally or you can add them to the top of the script you're submitting. PBS directives must be added to the top of the script on the lines immediately following the "shebang". The top of the script should appear as follows:

#!/bin/bash
#PBS [first option]
#PBS [second option]

Sample Options

A complete list of options for qsub and their descriptions can be found in the manfile. Samples of more commonly used options will be provided here.

-a date_time
Specifies a future time at which the job should execute.The date_time argument should take the form [MM][DD]hhmm. If the time given is earlier than the current time it will execute on the next day. Month and Day are optional parameters.
-e path
Defines the path used to output the standard error stream of the batch job.
-k
Defines which (if any) of the standard output or standard error streams will be stored. The parameter 'e' stores stderr. The parameter 'o' stores stdout. Using 'eo' or 'oe' will store both streams, and 'n' will store neither.
-l resource_list
The resource_list defines the list of resources that the job can consume. If not set for a generally available resource then no limit is set.