Hprc banner tamu.png

Difference between revisions of "Ada:Batch Job Files"

From TAMU HPRC
Jump to: navigation, search
(Optional Job Specifications)
Line 16: Line 16:
 
|+ Basic Ada (LSF) Job Specifications
 
|+ Basic Ada (LSF) Job Specifications
 
|-
 
|-
! style="width: 130pt;" | Specification
+
! style="width: 150pt;" | Specification
 
! style="width: 130pt;" | Option
 
! style="width: 130pt;" | Option
! style="width: 115pt;" | Example  
+
! style="width: 130pt;" | Example  
! style="width: 200pt;" | Example-Purpose
+
! style="width: 230pt;" | Example-Purpose
 
|-
 
|-
 
| Job Name
 
| Job Name
Line 49: Line 49:
 
| -M [MB]
 
| -M [MB]
 
| -M 2560
 
| -M 2560
| Sets the per process memory limit to 2560 mega-bytes (MBs).
+
| Sets the per process memory limit to 2560 MB.
 
|-
 
|-
 
| Memory Per Core
 
| Memory Per Core
Line 72: Line 72:
 
! style="width: 130pt;" | Option
 
! style="width: 130pt;" | Option
 
! style="width: 170pt;" | Example  
 
! style="width: 170pt;" | Example  
! style="width: 200pt;" | Example-Purpose
+
! style="width: 250pt;" | Example-Purpose
 
|-
 
|-
 
| Set Allocation
 
| Set Allocation
Line 98: Line 98:
 
|
 
|
 
| Assigns a whole node exclusively for the job.
 
| Assigns a whole node exclusively for the job.
 +
|}
 +
 +
=== Environment Variables ===
 +
All the nodes enlisted for the execution of a job carry most of the environment variables the login process created: HOME, PWD, PATH, USER, etc.
 +
In addition, LSF defines new ones in the environment of an executing job. Below, is a list of most commonly used environment variables.
 +
 +
{| class="wikitable" style="text-align: center;"
 +
|+ Basic Ada (LSF) Environment Variables
 +
|-
 +
! style="width: 130pt;" | Variable
 +
! style="width: 130pt;" | Usage
 +
! style="width: 300pt;" | Description
 +
|-
 +
| Job ID
 +
| $LSB_JOBID
 +
| Batch job ID assigned by LSF.
 +
|-
 +
| Job Name
 +
| $LSB_JOBNAME
 +
| The name of the Job.
 +
|-
 +
| Queue
 +
| $LSB_QUEUE
 +
| The name of the queue the job is dispatched from.
 +
|-
 +
| Error File
 +
| $LSB_ERRORFILE
 +
| Name of the error file specified with a bsub -e.
 +
|-
 +
| Submit Directory
 +
| $LSB_SUBCWD
 +
| The directory the job was submitted from.
 +
|-
 +
| Hosts I
 +
| $LSB_HOSTS
 +
| The list of nodes that are used to run the batch job, <br>repeated according to ptile value.
 +
|-
 +
| Hosts II
 +
| $LSB_MCPU_HOSTS
 +
| The list of nodes and the specified or default<br> ptile value per node to run the batch job.
 +
|-
 +
| Host file
 +
| $LSB_DJOB_HOSTFILE
 +
| The hostfile containing the list of nodes<br> that are used to run the batch job.
 
|}
 
|}
  

Revision as of 18:03, 6 January 2017

Job files

While not the only method of submitted programs to be executed, job files fulfill the needs of most users.

The general idea behind job files follows:

  • Make resource requests
  • Add your commands and/or scripting
  • Submit the job to the batch system

Basic Job Specifications

Several of the most important options are described below. These basic options are typically all that is needed to run a job on Ada.

Basic Ada (LSF) Job Specifications
Specification Option Example Example-Purpose
Job Name -J [SomeText] -J MyJob1 Set the job name to "MyJob1"
Shell -L [Shell] -L Uses specified Unix Shell to initialize
the job's execution environment.
Wall Clock Limit -W [hh:mm] -W 1:15 Set wall clock limit to 1 hour 15 min
Core count -n ## -n 20 Assigns 20 job slots/cores.
Cores per node -R "span[ptile=##]" -R "span[ptile=5]" Request 5 cores per node.
Memory Per Core -M [MB] -M 2560 Sets the per process memory limit to 2560 MB.
Memory Per Core -R "rusage[mem=[MB]]" -R "rusage[mem=2560]" Schedules job on nodes that have at
least 2560 MBs available per core.
Combined stdout and stderr -o [OutputName].%j -o stdout1.%j Collect stdout/err in stdout.[JobID]

Optional Job Specifications

A variety of optional specifications are available to customize your job. The table below lists the specifications which are most useful for users of Ada.

Optional Ada (LSF) Job Specifications
Specification Option Example Example-Purpose
Set Allocation -P ###### -P 274839 Set allocation to charge to 274839
Email Notification I -u [email-address] -u howdy@tamu.edu Send emails to howdy@tamu.edu.
Email Notification II N] -B -N Send email on beginning (-B) and end (-N) of job.
Specify Queue -q [queue] -q xlarge Request only nodes in xlarge subset.
Exclusive Node Usage -x Assigns a whole node exclusively for the job.

Environment Variables

All the nodes enlisted for the execution of a job carry most of the environment variables the login process created: HOME, PWD, PATH, USER, etc. In addition, LSF defines new ones in the environment of an executing job. Below, is a list of most commonly used environment variables.

Basic Ada (LSF) Environment Variables
Variable Usage Description
Job ID $LSB_JOBID Batch job ID assigned by LSF.
Job Name $LSB_JOBNAME The name of the Job.
Queue $LSB_QUEUE The name of the queue the job is dispatched from.
Error File $LSB_ERRORFILE Name of the error file specified with a bsub -e.
Submit Directory $LSB_SUBCWD The directory the job was submitted from.
Hosts I $LSB_HOSTS The list of nodes that are used to run the batch job,
repeated according to ptile value.
Hosts II $LSB_MCPU_HOSTS The list of nodes and the specified or default
ptile value per node to run the batch job.
Host file $LSB_DJOB_HOSTFILE The hostfile containing the list of nodes
that are used to run the batch job.

Clarification on Memory, Core, and Node Specifications

Memory Specifications are IMPORTANT.
For examples on calculating memory, core, and/or node specifications on Ada: Specification Clarification.