PBS `qsub`
We'll cover the following...
When you are new to PBS, the place to start is the qsub
command, which submits jobs to your HPC systems. The only jobs that the qsub
accepts are scripts, so you’ll need to package your tasks
appropriately. Here is a simple example script (myjob.pbs
):
#!/bin/bash#PBS -N demo // job name#PBS -o demo.txt // output file#PBS -e demo.txt // error output file#PBS -q workq // queue name#PBS -l mem=100mb // requested memory sizempiexec -machinefile /etc/myhosts -np 4 /home/user/area
The first line specified the shell to use in interpreting the script, while the next few lines
starting with #PBS
are directives that are passed to PBS. The first names the job, the next two
specify where output and error output go, the next to last identifies the queue that is used,
and the last lists a resource that will be needed, in this case 100 MB
of memory. The blank
line signals the end of PBS directives. Lines that follow the blank line indicate the actual job (details on the mpi
commands are discussed later). Once you have created the batch script for your job, the qsub
command is used to submit the
job:
qsub job.pbs
Some of the more commonly used qsub options are: