In the directory /scratch/jeppesen/test-run there are the following files:
-rw-r--r-- 1 jeppesen user 347 Jul 16 12:58 PHADIA.INI -rwxr-xr-x 1 jeppesen user 164567 Jul 16 12:58 a.out -rw-r--r-- 1 jeppesen user 75 Jul 16 12:58 jobThe files are a.out (the executable), PHADIA.INI (some input file for the executable), and job - the job file to be submitted to the queuing system. In this case the job file is as simple as:
############################################################################### # First we have some directives to the queueing system. Must be in the first # block of comment lines. # # We want to receive an e-mail when the job starts (b) and ends (e). # PBS -m be # # Make sure that we are in the same subdirectory as where the qsub command # is issued. # cd $PBS_O_WORKDIR # # Just for fun: which node did we end up on ? # /bin/hostname # # Run the executable. *DO NOT PUT* a '&' at the end - it will not work. # time ./a.out # # End of script-file. # ###############################################################################The job can be submitted from /scratch/jeppesen/test-run as follows:
<434 beofront../test-run> qsub job 185.beofront.mrl.ucsb.eduNote: you get a recipt from the qsub command - the job-id. In this case it's 185. The job could now be terminated using the qdel command: qdel 185. The qstat command can be used to monitor the job:
<437 beofront../test-run> qstat Job id Name User Time Use S Queue ---------------- ---------------- ---------------- -------- - ----- 185.beofront job jeppesen 00:00:30 R dqueA more usefull command for managing your jobs is the X-windows command xpbs.
When a job finishes the queuing system saves standard out and error in two files job-file-name.ejob-id and job-file-name.ojob-id respectively. In this example:
-rw------- 1 jeppesen user 0 Jul 16 13:06 job.e185 -rw------- 1 jeppesen user 186 Jul 16 13:06 job.o185There were no errors so job.e185 is empty - but job.o185 has the following content (output from hostname and time included):
Warning: no access to tty (Bad file descriptor). Thus no job control in this shell. node5.beowulf FREQ 800 FREQ 800 159.690u 0.010s 2:39.85 99.9% 0+0k 0+0io 134pf+0w