Submitting Jobs Via PBS on
PBS, the Portable Batch System, is a networked
subsystem for submitting, monitoring, and controlling a work load of batch jobs
on one or more systems. With PBS, jobs
can be scheduled for execution across the
man pbs
Jobs are submitted to be
run under PBS via the qsub
command. For complete details on using qsub, see the online manual page, which can be viewed by
executing the command:
man qsub
A job is represented by a
shell script which contains the commands which should be run. A simple PBS job script file might contain
lines like the following:
#PBS –l cput=
cd project1
./myprog
The job script file at its
simplest can be just a sequence of commands to be executed. But in general, it can be any script. The #PBS
statement is a special comment statement used to specify job parameters to PBS. Specify values for cput (CPU
time required) and ncpus (number of CPUs required) that are appropriate for
your job. The parameters on the #PBS statement
can also be specified with the qsub command
on the command line when the job is submitted, but it is convenient to put them
in the job file so that they aren’t forgotten.
The cput
parameter specifies the maximum amount of CPU time that the job will be allowed
to consume. If a job uses more CPU time
than the amount specified by cput, it will
be terminated by PBS. If cput is not
specified, a default time limit of 10 minutes (
The ncpus resource specification is very important for
job scheduling on
Once the job script has
been created, it can be submitted for execution via the qsub
command, as follows:
qsub
scriptfile
The qsub command
will respond with a line like the following:
nnnn.darwin0
where nnnn is the
job number assigned to the job, and darwin0 is the
name of the PBS server to which the job was submitted. (It doesn’t matter which
When the job is executed,
PBS will create an environment for it that is as much like your normal login
environment as is possible. The job will
run under your userid, and the initial working
directory will be your home directory.
If the files your jobs uses are not in your home directory, use relative
pathnames or full pathnames as appropriate.
After the job completes
execution, there will be two output files created in the directory from which
the job was submitted:
scriptfile.ennnn (for output written to the error output
stream)
scriptfile.onnnn (for output written to the standard output
stream)
where scriptfile is the
name of the script file you specified on the qsub command (or STDIN if you did not specify a script
file, and entered commands for the job from standard input), and nnnn is the
job number.
There are several job
queues that have been created on
Use the qstat command
to see which jobs are queued/executing on
For more information about
accessing