The command qsub can be used to submit a PBS job. Please see the man page for qsub for a variety of options that can be used with it. Continuing with the example script psort.pbs from the previous subsection, we can submit it for execution as follows.
cd ~amit/cs430/lab/PVM/tools/
qsub psort.pbs
The status of a job can be checked with the qstat command. Using qstat -n also shows the nodes that were allocated to your job.
[amit@onyx tools]:qsub psort.pbs qstat [amit@onyx tools]:qstat 116.onyx.boisestate.edu Job id Name User Time Use S Queue ---------------- ---------------- ---------------- -------- - ----- 116.onyx psort.pbs amit 0 Q default [amit@onyx tools]:qstat -n onyx.boisestate.edu: Req'd Req'd Elap Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time --------------- -------- -------- ---------- ------ --- --- ------ ----- - ----- 116.onyx.boises amit default psort.pbs -- 17 -- -- 00:30 R -- ws00/0+ws16/0+ws15/0+ws14/0+ws13/0+ws12/0+ws11/0+ws10/0+ws09/0+ws08/0+ws07/0 +ws06/0+ws05/0+ws04/0+ws03/0+ws02/0+ws01/0 [amit@onyx tools]:
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.
The following shows another example of submitting a job. This time we are specifying that the job should start anytime after the time specified in the qsub command, that we should be emailed at the start and end of the job, and the jobs is to be named test1.
[amit@onyx parallel_sum]$ qsub -m be -a 0400 -N test1 psum.pbs 853.onyx.boisestate.edu [amit@onyx parallel_sum]$ qstat -n onyx.boisestate.edu: Req'd Req'd Elap Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time --------------- -------- -------- ---------- ------ --- --- ------ ----- - ----- 853.onyx.boises amit default test1 -- 17 -- -- 00:30 W -- -- [amit@onyx parallel_sum]$ date Thu Sep 9 03:57:33 MDT 2004 [amit@onyx parallel_sum]$ [amit@onyx parallel_sum]$ date Thu Sep 9 04:00:23 MDT 2004 [amit@onyx parallel_sum]$ qstat -n [amit@onyx parallel_sum]$ls -l test1.*853 -rw------- 1 amit faculty 2047 Sep 9 04:00 test1.e853 -rw------- 1 amit faculty 1850 Sep 9 04:00 test1.o853 ----------------------Mail message----------------------------------- Date: Thu, 9 Sep 2004 04:00:00 -0600 From: adm <adm@onyx.boisestate.edu> To: amit@onyx.boisestate.edu Subject: PBS JOB 853.onyx.boisestate.edu PBS Job Id: 853.onyx.boisestate.edu Job Name: test1 Begun execution ----------------------Mail message----------------------------------- Date: Thu, 9 Sep 2004 04:00:02 -0600 From: adm <adm@onyx.boisestate.edu> To: amit@onyx.boisestate.edu Subject: PBS JOB 853.onyx.boisestate.edu PBS Job Id: 853.onyx.boisestate.edu Job Name: test1 Execution terminated Exit_status=0 resources_used.cput=00:00:00 resources_used.mem=312kb resources_used.vmem=1440kb resources_used.walltime=00:00:02 ---------------------------------------------------------------------