|Knowledge Center Contents Previous Next Index|
Submitting Jobs Using JSDL
Why Use JSDL?
The Job Submission Description Language (JSDL) provides a convenient format for describing job requirements. You can save a set of job requirements in a JSDL XML file, and then reuse that file as needed to submit jobs to LSF.
For detailed information about JSDL, see the "Job Submission Description Language (JSDL) Specification" at
Using 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
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 2: 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. JobDescription -P High-level container element that holds more specific cription elements. Job Identity Elements JobName -J String used to name the job. JobProject -P String that specifies the project to which the job belongs. 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
ApplicationVersion -app String that defines the version of the application defined in
Resource Elements CandidateHosts -m Complex type element that specifies the set of named hosts that can be selected to run the job. 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. OperatingSystemName -R A token type that contains the operating system name. LSF uses the external resource "osname." OperatingSystemVersion -R A token type that contains the operating system version. LSF uses the external resource "osver." CPUArchitectureName -R Token that specifies the CPU architecture required by the job in the execution environment. LSF uses the external resource "cpuarch." 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." IndividualCPUCount -n Range value that specifies the number of CPUs for each resource. IndividualPhysicalMemory -R Range value that specifies the amount of physical memory required on each resource, in bytes. IndividualVirtualMemory -R Range value that specifies the amount of virtual memory required for each resource, in bytes. IndividualNetworkBandwidth -R Range value that specifies the bandwidth requirements of each resource, in bits per second (bps). LSF uses the external resource "bandwidth." TotalCPUCount -n Range value that specifies the total number of CPUs required for the job. TotalPhysicalMemory -R Range value that specifies the required amount of physical memory for all resources for the job, in bytes. TotalVirtualMemory -R Range value that specifies the required amount of virtual memory for the job, in bytes. TotalResourceCount -n Range value that specifies the total number of resources required by the job. 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. CreationFlag -f Specifies whether the file created on the local execution system overwrites or append to an existing file. 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. POSIX Extension Elements Executable N/A String that specifies the command to execute. Argument N/A Constrained normalized string that specifies an argument for the application or command. Input -i String that specifies the Standard Input for the command. Output -o String that specifies the Standard Output for the command. Error -e String that specifies the Standard Error for the command. 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
/tmpdirectory on the execution host.
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. WallTimeLimit -W Positive integer that specifies the soft limit on the duration of the application's execution, in seconds. FileSizeLimit -F Positive integer that specifies the maximum size of any file associated with the job, in bytes. CoreDumpLimit -C Positive integer that specifies the maximum size of core dumps a job may create, in bytes. DataSegmentLimit -D Positive integer that specifies the maximum data segment size, in bytes. MemoryLimit -M Positive integer that specifies the maximum amount of physical memory that the job can use during execution, in bytes. StackSizeLimit -S Positive integer that specifies the maximum size of the execution stack for the job, in bytes. 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. ProcessCountLimit -p Positive integer that specifies the maximum number of processes the job can spawn. VirtualMemoryLimit -v Positive integer that specifies the maximum amount of virtual memory the job can allocate, in bytes. ThreadCountLimit -T Positive integer that specifies the number of threads the job can create.
LSF extension elements
To use all available LSF features, add the elements described in the following table to your JSDL file.Table 3: 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:Queue>normal</jsdl-lsf:Queue> <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></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
brsvaddto 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 emails for a job. See the following example: 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 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>
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
Job identity elements
Data staging elements
POSIX extension elements
Submit a job using a JSDL file
- To submit a job using a JSDL file, use one of the following
- To submit a job that uses elements included in the LSF extension, use the
- To submit a job that uses only standard JSDL elements and POSIX extensions, use the
-jsdl_strictoption. Error messages indicate invalid elements, including:
- Elements that are not part of the JSDL specification
- Valid JSDL elements that are not supported in this version of LSF
- Elements that are not part of the JSDL standard and POSIX extension schemas
If you specify duplicate or conflicting job submission parameters, LSF resolves the conflict by applying the following rules:
- The parameters specified in the command line override all other parameters.
- A job script or user input for an interactive job overrides parameters specified in the JSDL file.
Collecting resource values using elim.jsdl
To support the use of JSDL files at job submission, LSF collects the following load indices:
Attribute name Attribute type Resource name OperatingSystemName string osname OperatingSystemVersion string osver CPUArchitectureName string cpuarch IndividualCPUSpeed int64 cpuspeed IndividualNetworkBandwidth int64 bandwidth(This is the maximum bandwidth).
elim.jsdlis automatically configured to collect these resources, but you must enable its use by modifying the files
Enable JSDL resource collection
- In the file
cluster_name, locate the ResourcesMap section.
- In the file
lsf.shared, locate the Resource section.
- Uncomment the lines for the following resources in both files:
To propagate the changes through the LSF system, run the following commands.
You have now configured LSF to use the
elim.jsdlfile to collect JSDL resources.
Platform Computing Inc.
|Knowledge Center Contents Previous Next Index|