Jobs are submitted with the
The options tell Torque information about the job, such as what resources will be needed. These can be specified in the job-script as PBS directives, or on the command line as options, or both (in which case the command line options take precedence should the two contradict each other). For each option there is a corresponding PBS directive with the syntax:
For example, you can specify that a job needs 2 nodes and 8 cores on each node by adding to the script the directive:
or as a command-line option to
qsub when you submit the job:
PBS directives and qsub options for job dependencies and delayed-start jobs
Options for delaying starting a job:
Delay starting this job until
jobidhas completed successfully.
Delay starting this job until after the specified date and time. Month (
MM) and day-of-month (
DD) are optional, hour and minute are required.
If you have jobs which must not be started until some other job has begun, completed or failed, you can set up a job dependency with
-W depend=dependency. The most common dependency is "
afterok", the job can start only after another job has completed with an exit code of zero (ie no errors). For example, to wait until job 12345 has completed successfully before starting:
Other types of job dependencies, including dependencies on job arrays, can be found with "
Job dependencies are useful when you have one job postprocessing the results of other jobs. Job dependencies also allow you to reserve resources more efficiently: such as single-CPU postprocessing of the result of a large parallel job.
Similarly, you can instruct Torque to not start a job before a given date and time by the command line option or PBS directive
-a hhmm. The date/time format accepts day, month and year too. For example, to delay starting a job until midday on the first day of the next month: