-yaml

Submits a job using a YAML file to specify job submission options.

Categories

properties

Synopsis

bsub -yaml file_name

Conflicting options

Do not use with the following options: -json, -jsdl, -jsdl_strict.

Description

In the YAML file, specify the bsub option name or alias and the value as the key-value pair. To specify job command or job script, use the command option name with the name of the command or job script as the value. For options that have no values (flags), use null or (for string type options) an empty value. Specify the key-value pairs under the category name of the option.

If you specify duplicate or conflicting job submission parameters, LSF resolves the conflict by applying the following rules:
  1. The parameters that are specified in the command line override all other parameters.
  2. The parameters that are specified in the YAML file override the job script.

Job submission options and aliases

The following is a list of the bsub options to use in the file. You can use either the option name without a hyphen, or the alias. For example, to use the bsub -app option, specify either appName or app as the key name, and the application profile name as the key value.

Table 1. List of supported bsub command options, aliases, category, type, and maximum size by characters
Option Alias Category Type Maximum characters
a appSpecific schedule String 16415
alloc_flags allocFlags resource String Not applicable
app appName properties String 59
ar autoResize properties String 0 (takes no arguments)
B notifyJobDispatch notify String 0 (takes no arguments)
b specifiedStartTime schedule String 16
C coreLimit limit Numeric Not applicable
c cpuTimeLimit limit String 63 for hostnames (that is, if a hostname is specified as part of the limit, the host name is limited to 63 characters)
clusters clusters resource

schedule

String 39 per cluster
cn_cu computeNodeComputeUnit resource String Not applicable
cn_mem computeNodeMem resource Numeric Not applicable
core_isolation coreIsolation resource Numeric Not applicable
csm csm properties String 1 (accepts either yor y)
cwd cwd io String 4095
D dataLimit limit Numeric Not applicable
data data resource

properties

String array Up to 4095 for paths, or less than or equal to the NI_MAXHOST value (defined in the system header files) minus one) for hosts
datachk dataCheck resource

properties

String 0 (takes no arguments)
datagrp dataGroup resource

properties

String Not applicable
E preExecCmd properties String 4095
Ep postExecCmd properties String 4095
e errorAppendFile io String 4095
env envVariable properties String 4095
eo errorOverwriteFile io String 4095
eptl epLimitRemain limit String 511
ext extSched schedule String 1048575
F fileLimit limit Numeric Not applicable
f file io String 4095
freq frequency resource Numeric Not applicable
G userGroup schedule String 511
g jobGroupName properties String 511
gpu gpu resource String 768 for each key-value pair
H hold schedule String 0 (takes no arguments)
hl hostLimit limit String 0 (takes no arguments)
hostfile hostFile resource String 4095
I interactive properties String 0 (takes no arguments)
Ip interactivePty properties String 0 (takes no arguments)
IS interactiveSsh properties String 0 (takes no arguments)
ISp interactiveSshPty properties String 0 (takes no arguments)
ISs interactiveSshPtyShell properties String 0 (takes no arguments)
Is interactivePtyShell properties String 0 (takes no arguments)
IX interactiveXWin properties String 0 (takes no arguments)
i inputFile io String 4095
is inputHandleFile io String 4095
J jobName properties String 4095
Jd jobDescription properties String 4095
jsm jobStepManager properties String 1 (accepts either y, y, or d)
K jobWaitDone notify

properties

String 0 (takes no arguments)
k checkPoint properties String 4095
L loginShell properties String 58 (which is the operating system limit)
Lp licenseProjectName schedule String 2047
ln_mem launchNodeMem resource Numeric Not applicable
ln_slots launchNodeSlots resource Numeric Not applicable
M memLimit limit String Not applicable
m machines resource String 65 per host
mig migThreshold schedule Numeric Not applicable
N notifyJobDone notify String 0 (takes no arguments)
Ne notifyJobExit notify String 0 (takes no arguments)
n numTasks resource String Not applicable
notify notifyJobAny notify String 25
network networkReq resource String 768 for each key-value pair
nnodes numNodes resource Numeric Not applicable
o outputAppendFile io String 4095
oo outputOverwriteFile io String 4095
outdir outputDir io String 4095
P projectName properties String 511ho
p processLimit limit String Not applicable
pack pack pack String 0 (takes no arguments)
ptl pendTimeLimit limit String 511
Q exitCode properties String 511
q queueName properties String 59 for each queue
R resReq resource String array Not applicable
r rerun properties String 0 (takes no arguments)
rn rerunNever properties String 0 (takes no arguments)
rnc resizeNotifCmd properties String 4095
S stackLimit limit Numeric Not applicable
s signal properties Numeric Not applicable
sla serviceClassName properties String 59
smt smt properties Numeric Not applicable
sp jobPriority properties Numeric Not applicable
stage stage properties String 4095
step_cgroup stepCgroup properties String 1 (accepts either yor n)
T threadLimit limit Numeric Not applicable
t specifiedTerminateTime schedule String 16
ti terminateIndepend schedule String 0 (takes no arguments)
tty tty io String 0 (takes no arguments)
U rsvId schedule

resource

String 59
u mailUser notify String 511
ul userLimit limit String 0 (takes no arguments)
v swapLimit limit String Not applicable
W runtimeLimit limit String 64 for host models (defined in lsf.shared in the HostModel section)
We estimatedRunTime limit String 64 for host models (defined in lsf.shared in the HostModel section)
w dependency schedule String Not applicable
wa warningAction properties String 6
wt warningTime properties String Not applicable
XF x11Forward properties String 0 (takes no arguments)
x exclusive schedule String 0 (takes no arguments)
Zs jobSpool properties

script

String 0 (takes no arguments)
h help   String 0 (takes no arguments)
V version   String 0 (takes no arguments)
command

The job command with arguments or job script.

cmd   String 64,000 (which is the maximum length of one line in the job submission file)

For more information on the syntax of the key values to specify for each option, refer to the description of each bsub option in bsub.

Example

For the following job submission command:
bsub -r -H -N -Ne -i /tmp/input/jobfile.sh -outdir /tmp/output -C 5 -c 2022:12:12 -cn_mem 256 -hostfile /tmp/myHostFile.txt -q normal -G myUserGroup -u "user@example.com" myjob
The following YAML file specifies the equivalent job submission command:
io: 
    inputFile: /tmp/input/jobfile.sh
    outputDir: /tmp/output
limit: 
    coreLimit: 5
    cpuTimeLimit: 2022:12:12
resource: 
    computeNodeMem: 256
    hostFile: /tmp/myHostFile.txt
properties:
    queueName: normal
    rerun: null
schedule: 
    hold: ""
    userGroup: myUserGroup
notify: 
    notifyJobDone: ""
    notifyJobExit: 
    mailUser: user@example.com
command: myjob