LSB_BSUB_PARSE_SCRIPT

Specifies whether you can use the bsub command to parse and run job scripts from the command line.

Syntax

LSB_BSUB_PARSE_SCRIPT=Y|y|N|n

Description

When set to Y|y, you can use the bsub command to open, parse, and run job scripts directly from the command line. Submit a job with the job script as a command. The job script must be an ASCII text file and not a binary file.

By default (or when set to N|n), the bsub command does not open, parse, and run job scripts directly from the command line. bsub runs them as regular executable jobs.

  • Write a job file one line at a time. Run bsub without specifying a command, then specify valid Bourne shell commands or Windows batch file command lines at each bsub> prompt.
  • Use the < redirect to specify an ASCII text file that contains either Bourne shell command lines or Windows batch file command lines.

Use the #BSUB imperative (in upper case letters) at the beginning of each line to specify job submission options in the script.

Important: Do not use arguments when submitting job scripts (that is, do not submit your job as bsub script.sh arg1 arg2). If you use arguments with the job script, the #BSUB imperatives do not take effect.

Example

For example, the following script (myscript.sh) uses the #BSUB imperative to run the myjob1 arg1 and myjob2 arg2 commands with the bsub -n 2 and -P myproj options:

#!/bin/sh
#BSUB -n 2
myjob1 arg1
myjob2 arg2
#BSUB -P myproj

By default, run the following command to use this job script:

bsub myscript.sh

If LSB_BSUB_PARSE_SCRIPT=N is set, run the following command to use this job script:

bsub < myscript.sh

Alternatively, manually specify job submission options one line at a time to run the same commands as the previous myscript.sh file:

% bsub
bsub> #BSUB -n 2
bsub> myjob1 arg1
bsub> myjob2 arg2
bsub> #BSUB -P myproj
bsub> ^D

Default

N