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

#BSUB -q short-eth
#BSUB -J Matlab_job
#BSUB -oo MatJob-%J.out
#BSUB -eo MatJob-%J.err
. /etc/profile
module add matlab/2016b
  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 Stata14 multicore job script is shown below

#BSUB -q short-eth
#BSUB -x
#BSUB -J model1_job
#BSUB -oo model1-%J.out
#BSUB -eo model1-%J.err
. /etc/profile
module add stata/14
  stata-mp -b do

An example of an R job is shown below

#BSUB -q short-eth
#BSUB -J R_job
#BSUB -oo output-%J.out
#BSUB -eo output-%J.err
. /etc/profile
module add R/3.3.2/gcc

Submitting Jobs

bsub < JobScriptName.bsub