LSF:Batch Job Examples
Job File Examples
Several examples of LSF job files for Ada and Curie are listed below. For translating other job files, the Batch Job Translation Guide provides some reference.
Example Job 1: A serial job
##NECESSARY JOB SPECIFICATIONS #BSUB -J ExampleJob1 #Set the job name to "ExampleJob1" #BSUB -L /bin/bash #Uses the bash login shell to initialize the job's execution environment. #BSUB -W 2:00 #Set the wall clock limit to 2hr #BSUB -n 1 #Request 1 core #BSUB -R "span[ptile=1]" #Request 1 core per node. #BSUB -R "rusage[mem=5000]" #Request 5000MB per process (CPU) for the job #BSUB -M 5000 #Set the per process enforceable memory limit to 5000MB. #BSUB -o Example1Out.%J #Send stdout and stderr to "Example1Out.[jobID]" ##OPTIONAL JOB SPECIFICATIONS #BSUB -P 123456 #Set billing account to 123456 #BSUB -u email_address #Send all emails to email_address #BSUB -B -N #Send email on job begin (-B) and end (-N)
#First Executable Line
Example Job 2: A multi core, single node job
##NECESSARY JOB SPECIFICATIONS #BSUB -J ExampleJob2 #Set the job name to "ExampleJob2" #BSUB -L /bin/bash #Uses the bash login shell to initialize the job's execution environment. #BSUB -W 6:30 #Set the wall clock limit to 6hr and 30min #BSUB -n 10 #Request 10 cores #BSUB -R "span[ptile=10]" #Request 10 cores per node. #BSUB -R "rusage[mem=2560]" #Request 2560MB per process (CPU) for the job #BSUB -M 2560 #Set the per process enforceable memory limit to 2560MB. #BSUB -o Example2Out.%J #Send stdout and stderr to "Example2Out.[jobID]" ##OPTIONAL JOB SPECIFICATIONS #BSUB -P 123456 #Set billing account to 123456 #BSUB -u email_address #Send all emails to email_address #BSUB -B -N #Send email on job begin (-B) and end (-N) #First Executable Line
Example Job 3: A multi core, multi node job
##NECESSARY JOB SPECIFICATIONS #BSUB -J ExampleJob3 #Set the job name to "ExampleJob3" #BSUB -L /bin/bash #Uses the bash login shell to initialize the job's execution environment. #BSUB -W 24:00 #Set the wall clock limit to 24hr #BSUB -n 40 #Request 40 cores #BSUB -R "span[ptile=20]" #Request 20 cores per node. #BSUB -R "rusage[mem=2560]" #Request 2560MB per process (CPU) for the job #BSUB -M 2560 #Set the per process enforceable memory limit to 2560MB. #BSUB -o Example3Out.%J #Send stdout and stderr to "Example3Out.[jobID]" ##OPTIONAL JOB SPECIFICATIONS #BSUB -P 123456 #Set billing account to 123456 #BSUB -u email_address #Send all emails to email_address #BSUB -B -N #Send email on job begin (-B) and end (-N) #First Executable Line