Hprc banner tamu.png

Difference between revisions of "Ada:Batch Job Examples"

From TAMU HPRC
Jump to: navigation, search
(Job File Examples)
(Job File Examples)
 
Line 99: Line 99:
 
  #BSUB -B -N                  #Send email on job begin (-B) and end (-N)
 
  #BSUB -B -N                  #Send email on job begin (-B) and end (-N)
 
  #BSUB -q sn_short            #Send job to the sn_short node, which has one hour max walltime and is limited to single node jobs
 
  #BSUB -q sn_short            #Send job to the sn_short node, which has one hour max walltime and is limited to single node jobs
 
#First Executable Line
 
 
<span style="font-size:120%;">'''Example Job 6:'''</span> A serial job with v100 queue specification
 
#BSUB -J ExampleJob6        #Set the job name to "ExampleJob6"
 
#BSUB -L /bin/bash          #Uses the bash login shell to initialize the job's execution environment.
 
#BSUB -W 4:00                #Set the wall clock limit to 4hr
 
#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 Example6Out.%J      #Send stdout and stderr to "Example6Out.[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)
 
#BSUB -q v100                #Send job to the v100 node, which has a 2 day max walltime
 
  
 
  #First Executable Line
 
  #First Executable Line

Latest revision as of 09:01, 6 May 2021

Job File Examples

Several examples of LSF job files for Ada are listed below. For translating other job files, the Batch Job Translation Guide provides some reference.

NOTE: Job examples are NOT lists of commands, but are a template of the contents of a job file. These examples should be pasted into a text editor and submitted as a job to be tested, not entered as commands line by line.

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

Example Job 4: A serial GPU job

##NECESSARY JOB SPECIFICATIONS
#BSUB -J ExampleJob4         #Set the job name to "ExampleJob4"
#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=2560]"  #Request 2560MB per process (CPU) for the job
#BSUB -M 2560                #Set the per process enforceable memory limit to 2560MB.
#BSUB -o Example4Out.%J      #Send stdout and stderr to "Example4Out.[jobID]"
#BSUB -R "select[gpu]"       #Request a node with a GPU

##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

It is possible to request a whole GPU node by adding the following lines to optional job specifications:

#BSUB -x
#BSUB -R "select[gpu]" 

Please note that exclusive node use will also require more SUs.

Example Job 5: A serial job with queue specification

##NECESSARY JOB SPECIFICATIONS
#BSUB -J ExampleJob5         #Set the job name to "ExampleJob5"
#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 Example5Out.%J      #Send stdout and stderr to "Example5Out.[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)
#BSUB -q sn_short            #Send job to the sn_short node, which has one hour max walltime and is limited to single node jobs
#First Executable Line

More Examples

See more specialized job files at More Ada Examples and the HPRC Software page (if available) .