
To submit a job to PBS, the following command is used:
$ qsub myscript
where myscript is a file that contains the qsub options for the given job.
These options are given in the form of
#PBS option[[=]value]
where some options may require values to be included.
Control the environment in which the script operates.
| Directive | Options | Description |
|---|---|---|
| -A | Project name | Charge the specified project name. |
| -V | NONE | Export the environment. |
| -S | Shell path | Parse the job script using this shell. |
Control standard output, error, and mail reporting.
| Directive | Options | Description |
|---|---|---|
| -m | b | Send mail when the job begins execution. |
| -m | e | Send mail when the job finishes. |
| -e | File | Define standard error file. |
| -o | File | Define standard output file. |
| -M | E-mail address(es) | Send mail to address(es). |
| -j | oe | Send stdout and stderr to the same file. |
Specify how and where to run a job.
| Directive | Options | Description |
|---|---|---|
| -N | Name | Name of the job |
| -q | Name | Name of the queue |
| -r | y | Specifies that the job is rerunable. |
Specify resource limits to run a job.
| Directive | Description |
|---|---|
| -l ncpus=# | Number of cores to be used. |
Specify the maximum run length of the job.
| Directive | Description |
|---|---|
| -l walltime=# | Maximum wall-clock time. |
Note that times may be specified in the form [[hours:]minutes:]seconds or as an integer number of seconds. The following table provides examples of valid times:
| Time | Explanation |
|---|---|
| 120 | 120 seconds |
| 12:00:00 | 12 Hours, 0 minutes, and 0 seconds |
Specify the dependencies on other jobs. In PBS, the dependencies are specified with the following syntax:
#PBS -W depend=dependency_expression
where dependency_expression is a comma-delimited list of one or more dependencies. Each dependency is of the form
type:jobid[:jobid...]
where type is one of the directives listed below, and jobid[:jobid...] is a list of one or more job IDs upon which the dependency exists.
| Directive | Description |
|---|---|
| after | Execute current job after listed jobs have begun. |
| afterok | Execute current job after listed jobs have terminated without error. |
| afternotok | Execute current job after listed jobs have terminated with an error. |
| afterany | Execute current job after listed jobs have terminated for any reason. |
| before | Listed jobs can be run after current job begins execution. |
| beforeok | Listed jobs can be run after current job terminates without error. |
| beforenotok | Listed jobs can be run after current job terminates with an error. |
| beforeany | Listed jobs can be run after current job terminates for any reason. |
See the qsub man page for more information.
Last update: January 22, 2010
You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions: * The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations. * At any time, the USG may inspect and seize data stored on this IS. * Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG- authorized purpose. * This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy. * Not withstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential.