Difference between revisions of "Ada:Batch Job Examples"
(→Job File Examples) |
|||
(13 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
Several examples of LSF job files for Ada are listed below. For translating other job files, the [[HPRC:Batch_Translation | Batch Job Translation Guide]] provides some reference. | Several examples of LSF job files for Ada are listed below. For translating other job files, the [[HPRC:Batch_Translation | Batch Job Translation Guide]] provides some reference. | ||
− | <span style="font-size:120%;">'''Example Job 1:'''</span> A serial job | + | <font color=purple>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. </font> |
+ | |||
+ | <span style="font-size:120%;">'''Example Job 1:'''</span> A serial job | ||
##NECESSARY JOB SPECIFICATIONS | ##NECESSARY JOB SPECIFICATIONS | ||
#BSUB -J ExampleJob1 #Set the job name to "ExampleJob1" | #BSUB -J ExampleJob1 #Set the job name to "ExampleJob1" | ||
Line 18: | Line 20: | ||
#BSUB -u email_address #Send all emails to email_address | #BSUB -u email_address #Send all emails to email_address | ||
#BSUB -B -N #Send email on job begin (-B) and end (-N) | #BSUB -B -N #Send email on job begin (-B) and end (-N) | ||
− | + | ||
− | #First | + | #First Executable Line |
<span style="font-size:120%;">'''Example Job 2:'''</span> A multi core, single node job | <span style="font-size:120%;">'''Example Job 2:'''</span> A multi core, single node job | ||
Line 37: | Line 39: | ||
#BSUB -B -N #Send email on job begin (-B) and end (-N) | #BSUB -B -N #Send email on job begin (-B) and end (-N) | ||
− | #First | + | #First Executable Line |
<span style="font-size:120%;">'''Example Job 3:'''</span> A multi core, multi node job | <span style="font-size:120%;">'''Example Job 3:'''</span> A multi core, multi node job | ||
Line 55: | Line 57: | ||
#BSUB -B -N #Send email on job begin (-B) and end (-N) | #BSUB -B -N #Send email on job begin (-B) and end (-N) | ||
− | #First | + | #First Executable Line |
<span style="font-size:120%;">'''Example Job 4:'''</span> A serial GPU job | <span style="font-size:120%;">'''Example Job 4:'''</span> A serial GPU job | ||
Line 74: | Line 76: | ||
#BSUB -B -N #Send email on job begin (-B) and end (-N) | #BSUB -B -N #Send email on job begin (-B) and end (-N) | ||
− | #First | + | #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. | ||
+ | |||
+ | <span style="font-size:120%;">'''Example Job 5:'''</span> 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 [[Ada:More_Examples | More Ada Examples]] and the [[SW | HPRC Software page]] (if available) . | ||
− | [[Category:Ada | + | [[Category:Ada]] |
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) .