Use JSDL files with LSF

LSF complies with the JSDL specification by supporting most valid JSDL elements and POSIX extensions. The LSF extension schema allows you to use LSF features not included in the JSDL standard schema.

The following sections describe how LSF supports the use of JSDL files for job submission.

Where to find the JSDL schema files

The JSDL schema (jsdl.xsd), the POSIX extension (jsdl-posix.xsd), and the LSF extension (jsdl-lsf.xsd) are located in the LSF_LIBDIR directory.

Supported JSDL and POSIX extension elements

The following table maps the supported JSDL standard and POSIX extension elements to LSF submission options.
Note:

For information about how to specify JSDL element types such as range values, see the "Job Submission Description Language (JSDL) Specification" at http://www.gridforum.org/documents/GFD.56.pdf.

Table 1. Supported JSDL and POSIX extension elements

Element

bsub Option

Description

Example

Job Structure Elements

JobDefinition

N/A

Root element of the JSDL document. Contains the mandatory child element JobDescription.

<JobDefinition> <JobDescription> 
... </JobDescription>
</JobDefinition>

JobDescription

-P

High-level container element that holds more specific description elements.

Job Identity Elements

JobName

-J

String used to name the job.

<jsdl:JobName>myjob</jsdl:JobName>

JobProject

-P

String that specifies the project to which the job belongs.

<jsdl:JobProject>
myproject </jsdl:JobProject>

Application Elements

Application

N/A

High-level container element that holds more specific application definition elements.

ApplicationName

-app

String that defines the name of an application profile defined in lsb.applications.

<jsdl:Application> 
<jsdl:ApplicationName>ApplicationX 
</jsdl:ApplicationName> 
</jsdl:Application>

ApplicationVersion

-app

String that defines the version of the application defined in lsb.applications.

<jsdl:Application>
<jsdl:ApplicationName>
ApplicationX</jsdl:ApplicationName>
<jsdl:ApplicationVersion>5.5 
</jsdl:ApplicationVersion> 
... </jsdl:Application>

Resource Elements

CandidateHosts

-m

Complex type element that specifies the set of named hosts that can be selected to run the job.

<jsdl:CandidateHosts> 
<jsdl:HostName>host1
</jsdl:HostName>
<jsdl:HostName>host2
</jsdl:HostName> 
</jsdl:CandidateHosts>

HostName

-m

Contains a single name of a host or host group. See the previous example (CandidateHosts).

ExclusiveExecution

-x

Boolean that designates whether the job must have exclusive access to the resources it uses.

<jsdl:ExclusiveExecution>true 
</jsdl:ExclusiveExecution>

OperatingSystemName

-R

A token type that contains the operating system name. LSF uses the external resource "osname."

<jsdl:OperatingSystemName>LINUX 
</jsdl:OperatingSystemName>

OperatingSystemVersion

-R

A token type that contains the operating system version. LSF uses the external resource "osver."

<jsdl:OperatingSystemVersion>5.7
 
</jsdl:OperatingSystemVersion>

CPUArchitectureName

-R

Token that specifies the CPU architecture required by the job in the execution environment. LSF uses the external resource "cpuarch."

<jsdl:CPUArchitectureName>sparc 
</jsdl:CPUArchitectureName>

IndividualCPUSpeed

-R

Range value that specifies the speed of each CPU required by the job in the execution environment, in Hertz (Hz). LSF uses the external resource "cpuspeed."

<jsdl:IndividualCPUSpeed> 
<jsdl:LowerBoundedRange>
1073741824.0 </jsdl:
LowerBoundedRange>
 </jsdl:IndividualCPUSpeed>

IndividualCPUCount

-n

Range value that specifies the number of CPUs for each resource.

<jsdl:IndividualCPUCount>  
<jsdl:exact>2.0</jsdl:exact>
</jsdl:IndividualCPUCount>

IndividualPhysicalMemory

-R

Range value that specifies the amount of physical memory required on each resource, in bytes.

<jsdl:IndividualPhysicalMemory>
<jsdl:LowerBoundedRange>
1073741824.0 </jsdl: 
LowerBoundedRange>
</jsdl:IndividualPhysicalMemory>

IndividualVirtualMemory

-R

Range value that specifies the amount of virtual memory required for each resource, in bytes.

<jsdl:IndividualVirtualMemory>   
<jsdl:LowerBoundedRange>
1073741824.0
</jsdl:LowerBoundedRange>
</jsdl:IndividualVirtualMemory>

IndividualNetworkBandwidth

-R

Range value that specifies the bandwidth requirements of each resource, in bits per second (bps). LSF uses the external resource "bandwidth."

<jsdl:IndividualNetworkBandwidth> 
<jsdl:LowerBoundedRange>
104857600.0 </jsdl: 
LowerBoundedRange>
</jsdl:IndividualNetwork
Bandwidth>

TotalCPUCount

-n

Range value that specifies the total number of CPUs required for the job.

<jsdl:TotalCPUCount><jsdl:
exact>2.0 
</jsdl:exact></jsdl:
TotalCPUCount>

TotalPhysicalMemory

-R

Range value that specifies the required amount of physical memory for all resources for the job, in bytes.

<jsdl:TotalPhysicalMemory>  
<jsdl:LowerBoundedRange>
10737418240.0 </jsdl:
LowerBoundedRange>
</jsdl:TotalPhysicalMemory>

TotalVirtualMemory

-R

Range value that specifies the required amount of virtual memory for the job, in bytes.

<jsdl:TotalVirtualMemory> 
<jsdl:LowerBoundedRange>
1073741824.0 </jsdl: 
LowerBoundedRange>
</jsdl:TotalVirtualMemory>

TotalResourceCount

-n

Range value that specifies the total number of resources required by the job.

<jsdl:Resources>...   
<jsdl:TotalResourceCount>
<jsdl:exact>5.0</jsdl:exact>
</jsdl:TotalResourceCount>

Data Staging Elements

FileName

-f

String that specifies the local name of the file or directory on the execution host. For a directory, you must specify the relative path.

<jsdl:DataStaging><jsdl:FileName>   
job1/input/control.txt
</jsdl:FileName>
...</jsdl:DataStaging>

CreationFlag

-f

Specifies whether the file created on the local execution system overwrites or append to an existing file.

<jsdl:DataStaging> <jsdl: 
CreationFlag>
overwrite
</jsdl:CreationFlag> ...
</jsdl:DataStaging>

Source

N/A

Contains the location of the file or directory on the remote system. In LSF, the file location is specified by the URI element. The file is staged in before the job is executed. See the example for the Target element.

URI

-f

Specifies the location used to stage in (Source) or stage out (Target) a file. For use with LSF, the URI must be a file path only, without a protocol.

Target

N/A

Contains the location of the file or directory on the remote system. In LSF, the file location is specified by the URI element. The file is staged out after the job is executed.

<jsdl:DataStaging><jsdl:Source> 
<jsdl:URI>  
//input/myjobs/
control.txt
</jsdl:URI>
</jsdl:Source> <jsdl:Target>
<jsdl:URI> //output/myjobs/control.txt
</jsdl:URI></jsdl:Target> 
...</jsdl:DataStaging>

POSIX Extension Elements

Executable

N/A

String that specifies the command to execute.

<jsdl-posix:Executable>myscript 
</jsdl-posix:Executable>

Argument

N/A

Constrained normalized string that specifies an argument for the application or command.

<jsdl-posix:Argument>10 
</jsdl-posix:Argument>

Input

-i

String that specifies the Standard Input for the command.

...<jsdl-posix:Input>input.txt
</jsdl-posix:Input>...

Output

-o

String that specifies the Standard Output for the command.

...<jsdl-posix:Output>output.txt 
</jsdl-posix:Output>...

Error

-e

String that specifies the Standard Error for the command.

...<jsdl-posix:Error>error.txt 
</jsdl-posix:Error>...

WorkingDirectory

N/A

String that specifies the starting directory required for job execution. If no directory is specified, LSF sets the starting directory on the execution host to the current working directory on the submission host. If the current working directory is not accessible on the execution host, LSF runs the job in the /tmp directory on the execution host.

...<jsdl-posix: 
WorkingDirectory>
./home</jsdl-posix:WorkingDirectory> ..

Environment

N/A

Specifies the name and value of an environment variable defined for the job in the execution environment. LSF maps the JSDL element definitions to the matching LSF environment variables.

<jsdl-posix:Environment  
name="SHELL">
/bin/bash</jsdl-posix:Environment>

WallTimeLimit

-W

Positive integer that specifies the soft limit on the duration of the application’s execution, in seconds.

<jsdl-posix:WallTimeLimit>60 
</jsdl-posix:WallTimeLimit>

FileSizeLimit

-F

Positive integer that specifies the maximum size of any file associated with the job, in bytes.

<jsdl-posix:FileSizeLimit>
1073741824 </jsdl-posix:
FileSizeLimit>

CoreDumpLimit

-C

Positive integer that specifies the maximum size of core dumps a job may create, in bytes.

<jsdl-posix:CoreDumpLimit>0 
</jsdl-posix:CoreDumpLimit>

DataSegmentLimit

-D

Positive integer that specifies the maximum data segment size, in bytes.

<jsdl-posix:DataSegmentLimit>
32768 
</jsdl-posix:DataSegmentLimit>

MemoryLimit

-M

Positive integer that specifies the maximum amount of physical memory that the job can use during execution, in bytes.

<jsdl-posix:MemoryLimit> 
67108864
</jsdl-posix:MemoryLimit>

StackSizeLimit

-S

Positive integer that specifies the maximum size of the execution stack for the job, in bytes.

<jsdl-posix:StackSizeLimit>
1048576
</jsdl-posix:StackSizeLimit>

CPUTimeLimit

-c

Positive integer that specifies the number of CPU time seconds a job can consume before a SIGXCPU signal is sent to the job.

<jsdl-posix:CPUTimeLimit>30 
</jsdl-posix:CPUTimeLimit>

ProcessCountLimit

-p

Positive integer that specifies the maximum number of processes the job can spawn.

<jsdl-posix:ProcessCountLimit>8

</jsdl-posix:ProcessCountLimit>

VirtualMemoryLimit

-v

Positive integer that specifies the maximum amount of virtual memory the job can allocate, in bytes.

<jsdl-posix:VirtualMemoryLimit> 
134217728 
</jsdl-posix:VirtualMemoryLimit>

ThreadCountLimit

-T

Positive integer that specifies the number of threads the job can create.

<jsdl-posix:ThreadCountLimit>8 
</jsdl-posix:VirtualMemoryLimit>

LSF extension elements

To use all available LSF features, add the elements described in the following table to your JSDL file.
Table 2. LSF extension elements

Element

bsub Option

Description

SchedulerParams

N/A

Complex type element that specifies various scheduling parameters (starting with Queue and ending with JobGroup).

<jsdl-lsf:SchedulerParams> 
<jsdl-lsf:ResourceRequirements>
"select[swp>15 && hpux] order[ut]"
</jsdl-lsf:ResourceRequirements>
<jsdl-lsf:Start>12:06:09:55
</jsdl-lsf:Start>
<jsdl-lsf:Deadline>8:22:15:50
</jsdl-lsf:Deadline>
<jsdl-lsf:ReservationID>"user1#0"
</jsdl-lsf:ReservationID>
<jsdl-lsf:Dependencies>’done myjob1’
</jsdl-lsf:Dependencies>
<jsdl-lsf:Rerunnable>true
</jsdl-lsf:Rerunnable>
<jsdl-lsf:UserPriority>3
</jsdl-lsf:UserPriority>
<jsdl-lsf:ServiceClass>platinum
</jsdl-lsf:ServiceClass>
<jsdl-lsf:Group>sysadmin</jsdl-lsf:Group>
<jsdl-lsf:ExternalScheduler>pset
</jsdl-lsf:ExternalScheduler>
<jsdl-lsf:Hold>true </jsdl-lsf:Hold> 
<jsdl-lsf:JobGroup>/risk_group/portfolio1
/current
</jsdl-lsf:JobGroup>
</jsdl-lsf:SchedulerParams>

Queue

-q

String that specifies the queue in which the job runs.

ResourceRequirements

-R

String that specifies one or more resource requirements of the job. Multiple rusage sections are not supported.

Start

-b

String that specifies the earliest time that the job can start.

Deadline

-t

String that specifies the job termination deadline.

ReservationID

-U

String that specifies the reservation ID returned when you use brsvadd to add a reservation.

Dependencies

-w

String that specifies a dependency expression. LSF does not run your job unless the dependency expression evaluates to TRUE.

Rerunnable

-r

Boolean value that specifies whether to reschedule a job on another host if the execution host becomes unavailable while the job is running.

UserPriority

-sp

Positive integer that specifies the user-assigned job priority. This allows users to order their own jobs within a queue.

ServiceClass

-sla

String that specifies the service class where the job is to run.

Group

-G

String that associates the job with the specified group for fairshare scheduling.

ExternalScheduler

-ext [sched]

String used to set application-specific external scheduling options for the job.

Hold

-H

Boolean value that tells LSF to hold the job in the PSUSP state when the job is submitted. The job is not scheduled until you tell the system to resume the job.

JobGroup

-g

String that specifies the job group to which the job is submitted.

NotificationParams

N/A

Complex type element that tells LSF when and where to send notification email for a job. See the following example:

<jsdl-lsf:NotificationParams>
<jsdl-lsf:NotifyAtStart>
true</jsdl-lsf:NotifyAtStart>
<jsdl-lsf:NotifyAtFinish>
true</jsdl-lsf:NotifyAtFinish>
<jsdl-lsf:NotificationEmail>
-u user10</jsdl-lsf:NotificationEmail>
</jsdl-lsf:NotificationParams>

NotifyAtStart

-B

Boolean value that tells LSF to notify the user who submitted the job that the job has started.

NotifyAtFinish

-N

Boolean value that tells LSF to notify the user who submitted the job that the job has finished.

NotificationEmail

-u

String that specifies the user who receives notification emails.

RuntimeParams

N/A

Complex type element that contains values for LSF runtime parameters.

<jsdl-lsf:RuntimeParams> 
<jsdl-lsf:Interactive>I</jsdl-lsf:Interactive> 
<jsdl-lsf:Block>true
</jsdl-lsf:Block><jsdl-lsf:PreExec>myscript
</jsdl-lsf:PreExec><jsdl-lsf:Checkpoint>
myjobs/checkpointdir</jsdl-lsf:Checkpoint>
<jsdl-lsf:LoginShell>/csh</jsdl-lsf:LoginShell>
<jsdl-lsf:SignalJob>
18</jsdl-lsf:SignalJob>
<jsdl-lsf:WarningAction>
’URG’</jsdl-lsf:WarningAction>
<jsdl-lsf:WarningTime>
’2’</jsdl-lsf:WarningTime>
<jsdl-lsf:SpoolCommand>true
</jsdl-lsf:SpoolCommand>
 <jsdl-lsf:Checkpoint></jsdl-lsf:RuntimeParams>

Interactive

-I[s|p]

String that specifies an interactive job with a defined pseudo-terminal mode.

Block

-K

Boolean value that tells LSF to complete the submitted job before allowing the user to submit another job.

PreExec

-E

String that specifies a pre-exec command to run on the batch job’s execution host before actually running the job. For a parallel job, the pre-exec command runs on the first host selected for the parallel job.

Checkpoint

-k

String that makes a job checkpointable and specifies the checkpoint directory.

LoginShell

-L

For UNIX jobs, string that tells LSF to initialize the execution environment using the specified login shell.

SignalJob

-s

String that specifies the signal to send when a queue-level run window closes. Use this to override the default signal that suspends jobs running in the queue.

WarningAction

-wa

String that specifies the job action prior to the job control action. Requires that you also specify the job action warning time.

WarningTime

-wt

Positive integer that specifies the amount of time prior to a job control action that the job warning action should occur.

SpoolCommand

-is

Boolean value that spools a job command file to the directory specified by JOB_SPOOL_DIR, and uses the spooled file as the command file for the job.

Unsupported JSDL and POSIX extension elements

The current version of LSF does not support the following elements:

Job structure elements

  • Description

Job identity elements

  • JobAnnotation

Resource elements

  • FileSystem

  • MountPoint

  • MountSource

  • DiskSpace

  • FileSystemType

  • OperatingSystemType

  • IndividualCPUTime

  • IndividualDiskSpace

  • TotalCPUTime

  • TotalDiskSpace

Data staging elements

  • FileSystemName

  • DeleteOnTermination

POSIX extension elements

  • LockedMemoryLimit

  • OpenDescriptorsLimit

  • PipeSizeLimit

  • UserName

  • GroupName