qsub
the qsub command sends a job to the queue system (eg. qsub script
), which receives a unique number (the so-called job-id).
Sample form of the script
file:
#PBS -N name
#PBS -q queue
#PBS -l resources
#PBS -j oe
job
All information passed to the queue system in the script must start with #PBS
characters, after which you can use different options:
- -N defines the name of the task; lack of this option causes the name of the task to be the initial string of characters from the script,
- -q defines the queue under which the task is to be executed; if this option is missing, the task will be started as part of the default queue,
- -l defines the use of different resources:
- nodes, e.g.
nodes=4
means the use of 4 nodes on which it will be used 1 core,nodes=2:ppn=5
means the use of two nodes on which 5 cores will be used, - walltime, np
walltime=2:15:40
means to complete the task in real time in 2h 15m 40s, - mem, np
mem=320kb
means the use of 320kB memory, - -j connects the output stream and errors into one file with the standard name:
name.ojob-id
; lack of this option will create two files:name.ojob-id
andname.ejob-id
, - about other options you can learn from the command help (
man qsub
).
The following example of a script sent to the queue:
#PBS -N test-1
#PBS -q batch
#PBS -l nodes=3:ppn=4, walltime=2:00:00
#PBS -j oe
#PBS -o test.o
job
defines the following conditions of the job:
- the job will have a name
test-1
- the job will be running in the queue
batch - three nodes will be needed for execution, 4 cores will be occupied on each of them
- the job will be performed for a maximum of 2 hours
- the error stream will be attached to the output stream
- the result of the script will be saved in the file
test.o