How to Use the Cluster (Advanced)

Requesting an Email after a job ends/aborts/begins

In your qsub script you can add options for receiving an email when your job either begins to run, terminates, or is aborted.

BUT BEWARE! You will get an email for every job, even if it is in the thousands. If you send to GMail, they will block email from Loyola as spam. If you send to Loyola, it can overrun your email size limit. If you need to have an email for every job, contact George for a email address, which can handle thousands of emails in a short time without adverse effects.

For email, there are three options you can add as well:
a: mail sent on abort
b: mail sent on begin
e: mail sent when terminated
An example using all three: #PBS -m abe

Give parameters when call qsub

When you run your script via “qsub <scriptname>”, you can provide parameters in that command that are then passed to the program you are running. To give parameters, use the “-F” option when running qsub:

qsub -F "arg1 arg2 arg3" script.qsub

In your qsub script you can access these values using $1, $2, etc. The variables $1, etc, will be replaced with the values you use when you call qsub. An example of using these values as parameters to the FileExample program run in the simple script on the How to Use the Cluster (QSub) page looks like this:

#PBS -N hpl-example1
#PBS -l nodes=10:ppn=4
#PBS -e logs/error1.log
#PBS -o logs/output1.log
java FileExample $1 $2 $3

Running Many Jobs at Once

<example to come>

Qsub options

Torque’s version of qsub has many options. For a full listing, see the Torque Job Submission Website, or run “man qsub” on the command line on ocha.