To submit a job to the computing cluster, you need to create a script which will call your program.  Here is a sample script to run your program:

#!/bin/bash
# NOTE: The '#' symbol is NOT a comment on the first line (above) and on the 'PBS' lines.  Do NOT remove the '#' on these lines.

# declare a name for this job to be myjob
#PBS -N myjob

# mail is sent to you when the job starts and when it terminates or aborts
#PBS -m bea

# specify your email address
#PBS -M jdoe@bucknell.edu

# The following line places you in the directory from which the job was submitted.
cd "$PBS_O_WORKDIR"

# run the program using the relative path
./program_name arg1 arg2 ...

exit 0

NOTE: You’ll need to replaced program_name with the name of your program and arg1 arg2 … with any arguments that you need to supply to your program.

If, for example, you were to create the above script in a file called runjob, you can then submit your job using the command:

qsub runjob

Typically, a batch job generates at least two files: an output file (i.e. STDOUT) and an error file (i.e. STDERR).  The naming convention is jobname.oJOBID for the output file and jobname.eJOBID for the error file; JOBID is the unique ID of the job. Please note that there is a limit to how much data you print via standard out and standard error; you can read about that limit here. Run man qsub for more information on the qsub command.

Also, depending on the type of job you’re running, it may be important for you to increase the memory limit for your job.

For additional information or assistance, please contact the Tech Desk at 570.577.7777 or techdesk@bucknell.edu.

Keywords: hpc, Linux, linux cluster