Options on the qsub command allow the specification of attributes which affect the behavior of the job. The job is created by sending a Queue Job batch request to the batch server.
The qsub command will pass certain environment variables in the attribute of the job. These variables will be available to the job. The value for the following variables will be taken from the environment of the qsub command: HOME, LANG, LOGNAME, PATH, MAIL, SHELL, and TZ. These values will be assigned to a new name which is the current name prefixed with the string "PBS_O_". For example, the job will have access to an environment variable named PBS_O_HOME which have the value of the variable HOME in the qsub command environment.
In addition to the above, the following environment variables will be available to the batch job. (The values of the following environment variables are established by qsub.)
The following are established by the server executing the job, not the qsub command.
The argument is in the form:
Where CC is the first two digits of the year (the century), YY is the second two digits of the year, MM is the two digits for the month, DD is the day of the month, hh is the hour, mm is the minute, and the optional SS is the seconds.
If the month, is not specified, it will default to the current month if the specified day is in the future. Otherwise, the month will be set to next month. Likewise, if the day, is not specified, it will default to today if the time is in the future. Otherwise, the day will be set to tomorrow. For example, if you sumit a job at 11:15am with a time of the job will be eligable to run at 11:10am tomorrow. See the date_time operand for the touch(1) command defined by POSIX.2.
The job attribute will be set to the number of seconds since Epoch which is equivalent to the Universal time expressed by the local time in the argument. If the option is not specified, the attribute is unset which represents a time zero or no delay.
If is not specified, the attribute is set to the value
The -I option is a violation of the POSIX 1003.2d standard. Option key
letters not defined by the standard, such as I, are reserved for future
revisions of the standard. PBS can be built with the symbol
PBS_NO_POSIX_VIOLATION defined, in which case the -I option is removed.
The interactive attribute may still be specified via the -W option.
POSIX.2 reserves all undefined option letters for future versions of the
standard. The single letter 'W' is allowed for extensions. PBS makes use
of the -W to specify attributes which are extensions to POSIX 1003.2d.
The general syntax of the -W is in the form:
Error processing of the existence, state, or condition of the job on which the newly submitted job is a deferred service, i.e. the check is performed after the job is queued. If an error is detected, the new job will be deleted by the server. Mail will be sent to the job submitter stating the error.
Dependency examples:
If the operand is not provided or the operand is the single character "-", the qsub command reads the script from standard input. When the script is being read from Standard Input, qsub will copy the file to a temporary file. This temporary file is passed to the library interface routine pbs_submit. The temporary file is removed by qsub after pbs_submit returns or upon the receipt of a signal which would cause qsub to terminate.
When the job is created, a copy of the script file is made and that copy cannot be modified.
The environment variable PBS_DEFAULT defines the name of the default server. Typically, it corresponds to the system name of the host on which the server is running. If PBS_DEFAULT is not set, the default is defined by an administrator established file.
The environment variable PBS_DPREFIX determines the prefix string which identifies directives in the script.
Script Processing:
A job script may consist of PBS directives, comments and executable statements. A PBS directive provides a way of specifying job attributes in addition to the command line options. For example:
The qsub command scans the lines of the script file for directives. An initial line in the script that begins with the characters "#!" or the character ":" will be ignored and scanning will start with the next line. Scanning will continue until the first executable line, that is a line that is not blank, not a directive line, nor a line whose first non white space character is "#". If directives occur on subsequent lines, they will be ignored.
A line in the script file will be processed as a directive to qsub if and only if the string of characters starting with the first non white space character on the line and of the same length as the directive prefix matches the directive prefix.
The remainder of the directive line consists of the options to qsub in the same syntax as they appear on the command line. The option character is to be preceded with the "-" character.
If an option is present in both a directive and on the command line, that option and its argument, if any, will be ignored in the directive. The command line takes precedence.
If an option is present in a directive and not on the command line, that option and its argument, if any, will be processed as if it had occurred on the command line.
The directive prefix string will be determined in order of preference from:
The value of the option argument if the option is specified on the command line.
The value of the environment variable PBS_DPREFIX if it is defined.
The four character string
User Authorization:
When the user submits a job from a system other than the one on which the PBS Server is running, the name under which the job is to be executed is selected according to the rules listed under the -u option. The user submitting the job must be authorized to run the job under the execution user name. This authorization is provided if
C-Shell .logout File:
The following warning applies for users of the c-shell, csh.
If the job is executed under the csh and a
.logout
file exists in the home directory in which the job executes,
the exit status of the job is that of the .logout script, not the job script.
This may impact any inter-job dependencies.
To preserve the job exit status, either remove the .logout file or place the
following line as the first line in the .logout file
and the following line as the last executable line in .logout
Interactive Jobs:
If the option is specified on the command line or in a script directive, or if the "interactive" job attribute declared true via the -W option, either on the command line or in a script directive, the job is an interactive job. The script will be processed for directives, but will not be included with the job. When the job begins execution, all input to the job is from the terminal session in which qsub is running.
When an interactive job is submitted, the qsub command will not terminate when the job is submitted. Qsub will remain running until the job terminates, is aborted, or the user interrupts qsub with an SIGINT (the control-C key). If qsub is interrupted prior to job start, it will query if the user wishes to exit. If the user response "yes", qsub exits and the job is aborted.
One the interactive job has started execution, input to and output from the job pass through qsub. Keyboard generated interrupts are passed to the job. Lines entered that begin with the tilde ('~') character and contain special sequences are escaped by qsub. The recognized escape sequences are:
If the qsub command fails, the command exits with a value greater than zero.