Difference between revisions of "Qsub"
(One intermediate revision by the same user not shown) | |||
Line 29: | Line 29: | ||
;-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. | ;-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. | + | ;-e ''path'': Defines the path used to output the standard error stream of the batch job. By default output will be stored in the current working directory, and path names that aren't absolute paths will be expanded in the current working directory. |
− | ;-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. | + | ;-j ''option'' : Declares that the stdout and stderr streams of the job will be merged and outputted to a single file. The option oe will merge the two streams as stdout, and the option eo will merge the streams to stderr. |
+ | |||
+ | ;-k ''option'': 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 in the given order, 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. | ;-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. | ||
+ | |||
+ | ;-m ''options'' : Allows you to select the conditions under which the server will mail a message about the job's status. Option 'a' sends a message when the job is aborted. Option 'b' sends a message when the job begins, and option 'e' sends a message when the job ends. | ||
+ | |||
+ | ;-M ''user_list'' : Defines the set of users who will receive mail about the job. The user list should be a comma separated list of e-mail addresses. | ||
+ | |||
+ | ;-N ''name'' : Sets a name for the job. May be up to 15 characters in length. | ||
+ | |||
+ | ;-o ''path'' : Sets the path to which the standard output stream will be stored. | ||
+ | |||
+ | ;-p ''priority : Sets the priority of the job. Must be an integer between -1024 and +1023. Default is no priority which is equivalent to priority zero. | ||
+ | |||
+ | ;-r ''y|n'' : Defines whether the job is rerunable. The default value is 'y'. For information on rerunning jobs refer to the [http://www.clusterresources.com/torquedocs21/commands/qrerun.shtml qrerun] command. | ||
+ | |||
+ | ;-u ''user_list'' : Defines the user name under which the job will run. Default is the user who is running the qsub command. |
Latest revision as of 15:45, 14 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 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]
More examples of submit scripts can be found here.
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. By default output will be stored in the current working directory, and path names that aren't absolute paths will be expanded in the current working directory.
- -j option
- Declares that the stdout and stderr streams of the job will be merged and outputted to a single file. The option oe will merge the two streams as stdout, and the option eo will merge the streams to stderr.
- -k option
- 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 in the given order, 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.
- -m options
- Allows you to select the conditions under which the server will mail a message about the job's status. Option 'a' sends a message when the job is aborted. Option 'b' sends a message when the job begins, and option 'e' sends a message when the job ends.
- -M user_list
- Defines the set of users who will receive mail about the job. The user list should be a comma separated list of e-mail addresses.
- -N name
- Sets a name for the job. May be up to 15 characters in length.
- -o path
- Sets the path to which the standard output stream will be stored.
- -p priority : Sets the priority of the job. Must be an integer between -1024 and +1023. Default is no priority which is equivalent to priority zero.
- -r y|n
- Defines whether the job is rerunable. The default value is 'y'. For information on rerunning jobs refer to the qrerun command.
- -u user_list
- Defines the user name under which the job will run. Default is the user who is running the qsub command.