Skip to end of metadata
Go to start of metadata

Jobs are submitted with the qsub command:

$ qsub options job-script

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:

#PBS option

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: 

$ qsub -l nodes=2:ppn=8 my_script.q

Options for running interactively on the compute nodes:

  • -I
    Don't just submit the job, but also wait for it to start and connect stdout, stderr and stdin to the current terminal.
  • -X
    Enable X forwarding, so programs using a GUI can be used during the session (provided you have X forwarding to your workstation set up)
  • -V
    Pass the current environment to the interactive batch job
  • To leave an interactive batch session, type exit at the command prompt.

Options for many similar jobs (array jobs and pbsdsh):

  • -t 1,10,50-100
    Submit an array of jobs with array ids as specified. Array ids can be specified as a numerical range, a comma-separated list of numbers, or as some combination of the two. Each job instance will have an environment variable $PBS_ARRAYID
  • -t 1,10,50-100%5
    As above, but the appended '%n' specifies the maximum number of array items (in this case, 5) which should be running at one time
  • Submit a single "shepherd" job requesting multiple processes and from it start individual jobs with pbsdsh.

  • No labels