next up previous contents
Next: Debugging MPI programs Up: Running parallel programs in Previous: Preparing a PBS batch   Contents

Submitting a PBS batch job script

The command qsub can be used to submit a PBS job. Continuing with the example script psort.pbs from the previous subsection, we can submit it for execution as follows.

cd lab/MPI/parallel-sum
qsub sum.pbs

The status of a job can be checked with the qstat -a command. Using qstat -n also shows the nodes that were allocated to your job.

[amit@onyx parallel-sum]$ qstat -a
onyx.boisestate.edu: 
                                                                             Req'd   Elap
Job ID                  Username    Queue    Jobname SessID  NDS  TSK Memory Time S  Time
----------------------- ----------- -------- ---------------- ------ ----- ------ ----------
2594.onyx.boisestate.e  broyster    interact STDIN   21811  2 2:node  -- 00:30:00 R 00:00:54
2595.onyx.boisestate.e  amit        batch    sum.pbs   --   8 8:node  -- 02:00:00 Q    -- 
[amit@onyx parallel-sum]$ qstat -n

onyx.boisestate.edu: 
                                                                              Req'd   Elap
Job ID                  Username    Queue    Jobname SessID  NDS  TSK Memory  Time  S Time
----------------------- ----------- -------- ---------------- ------ ----- ------ -----------
2594.onyx.boisestate.e  broyster    interact STDIN    21811  2 2:node -- 00:30:00   R 00:00:58
   node18/0+node19/0
2595.onyx.boisestate.e  amit        batch    sum.pbs    --   8 8:node -- 02:00:00   Q  -- -- 
[amit@onyx parallel-sum]$ qstat -n

onyx.boisestate.edu: 
                                                                            Req'd       Elap
Job ID                  Username    Queue    Jobname SessID  NDS TSK Memory Time    S   Time
----------------------- ----------- -------- ---------------- ------ ----- ------   ----------
2594.onyx.boisestate.e  broyster    interact STDIN   21811   2 2:node  --   00:30:00 R  00:01:06
   node18/0+node19/0
2595.onyx.boisestate.e  amit        batch    sum.pbs   0     8 8:node  --   02:00:00 R  00:00:06
   node01/0+node08/0+node07/0+node06/0+node05/0+node04/0+node03/0+node02/0
[amit@onyx parallel-sum]$

You can delete jobs with the qdel command.

The standard output and standard error streams are redirected into the files psort.pbs.oxxx and psort.pbs.exxx, where xxx is the job number assigned by PBS.

In case of an error in running the job after it has been accepted in the queue, PBS sends an email to the user.



Amit Jain 2016-09-08