Difference between revisions of "Qsub"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
Line 5: Line 5:
 
The basic syntax for qsub is  
 
The basic syntax for qsub is  
  
  $ qsub [options] <script>
+
  $ qsub [options] [file]
  
Where <script> is the path to the executable script you want to submit to the PBS queue.  
+
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 ==
Line 18: Line 22:
  
 
A complete list of options for qsub and their descriptions can be found in the [http://www.clusterresources.com/torquedocs21/commands/qsub.shtml manfile]. Samples of more commonly used options will be provided here.
 
A complete list of options for qsub and their descriptions can be found in the [http://www.clusterresources.com/torquedocs21/commands/qsub.shtml 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.

Revision as of 04:58, 11 September 2009

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

$ 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 either be entered in the command line normally or added to the top of the script you're executing. PBS directives needed to be added to the top of the script on the lines immediately following the "shebang". They should be written as follows:

#PBS [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.