QuickStart Job Submission (qsub)
-
Job Submission Example (sample.pbs)
#!/bin/bash
## sample.pbs simple submission file to help demonstrate some options
##### These lines are for qsub/Moab
#PBS -l nodes=1:ppn=1 ## 1 node and 1 core
#PBS -l walltime=5:00 ## for five minutes
#PBS -N qsub_example ## with a name
#PBS -m abe ## send emails (abort, begin & error)
#PBS -M tboyle@kennesaw.edu ## where to send emails
#PBS -o myname.output ## name your output file
#PBS -e myname.error ## name your error file## With no queue specified, the job will run on the default batch queue
##PBS -q batch ## or you can enter a queue##### Load modules needed
module purge ## remove any loaded modules
module load MATLAB ## load the MATLAB environment##### Set the JOBID Variable
JOBID=`echo $PBS_JOBID | cut -f1 -d##### These are shell commands that output and write to data file
echo "Job started at $(date)" > $(date +"%Y%m%d")
sleep 120 ## Do nothing with MATLAB for 2 minutes ;)
echo "This machine is $HOSTNAME" > $(date +"%Y%m%d")echo "Job ended at $(date)" > $(date +"%Y%m%d")
exit 0
-
Submit the Job
$ qsub sample.pbs
Returns with JOBID.roland (example: 34823.roland)
You will be sent an email with some job details.
-
Monitor Your Job
$ qstat JOBID -
Monitor All Your Jobs
qstat -u YOUR_NETID
You will be sent an email when the job terminates (properly or unexpectedly).