Sequential Job Scripts

LSF jobscripts can be configured to request particular cluster resource, i.e. the queue to run the job on or the name of the job. After you have added your LSF directives to your job submission script, the required modules must be loaded and finally the command is executed. 

An example of a Matlab job script is shown below

#!/bin/sh
#BSUB -q short
#BSUB -J Matlab_job
#BSUB -oo MatJob-%J.out
#BSUB -eo MatJob-%J.err
. /etc/profile
module add matlab/2013a
  matlab -nodisplay -nojvm -nodesktop -nosplash -r my_matlab_m_file

Switch meaning

 -q short - Submit to short queue
  -J Matlab_job - Set job name
  -oo MatJob-%J.out - Overwrite job output to MatJob-(job_number).out
  -eo MatJob-%J.err - Overwrite job error to MatJob-(job_number).err


An example of a Stata13 multicore job script is shown below

#!/bin/sh
#BSUB -B
#BSUB -N
#BSUB -q short
#BSUB -x
#BSUB -R 'select[sandy]'
#BSUB -J model1_job
#BSUB -oo model1-%J.out
#BSUB -eo model1-%J.err
. /etc/profile
module add stata/13
  stata-mp -b do Modelfile.do

An example of an R job is shown below

#BSUB -q short
#BSUB -J R_job
#BSUB -oo output-%J.out
#BSUB -eo output-%J.err
. /etc/profile
module add R/2.15.1
R CMD BATCH TestRFile.R

To run your job on a 20 core Ivy Bridge system use the following request

#BSUB -R 'select[ivy]'

It is possible to have your jobs run on the Sandy Bridge 16 core

#BSUB -R 'select[sandy]'

It is also possible to have your jobs run on the older 12 core nodes

#BSUB -R 'select[west]'

Submitting Jobs

bsub < JobScriptName.bsub