Platform LSF Administration Guide Version 6.2

Chapter 41
Job Email, and Job File Spooling
Administering Platform LSF
581
File Spooling for Job Input, Output, and Command
Files
About job file spooling
LSF enables spooling of job input, output, and command files by creating directories
and files for buffering input and output for a job. LSF removes these files when the job
completes.
You can make use of file spooling when submitting jobs with the
-is and -Zs options
to
bsub. Use similar options in bmod to modify or cancel the spool file specification for
the job. Use the file spooling options if you need to modify or remove the original job
input or command files before the job completes. Removing or modifying the original
input file does not affect the submitted job.
File spooling is not supported across MultiClusters.
Specifying job input files
Use the bsub -i input_file and bsub -is input_file commands to get the
standard input for the job from the file path name specified by input_file. The path can
be an absolute path or a relative path to the current working directory. The input file can
be any type of file, though it is typically a shell script text file.
LSF first checks the execution host to see if the input file exists. If the file exists on the
execution host, LSF uses this file as the input file for the job.
If the file does not exist on the execution host, LSF attempts to copy the file from the
submission host to the execution host. For the file copy to be successful, you must allow
remote copy (
rcp) access, or you must submit the job from a server host where RES is
running. The file is copied from the submission host to a temporary file in the directory
specified by the JOB_SPOOL_DIR parameter in
lsb.params, or your
$HOME/.lsbatch directory on the execution host. LSF removes this file when the job
completes.
The
-is option of bsub spools the input file to the directory specified by the
JOB_SPOOL_DIR parameter in
lsb.params, and uses the spooled file as the input
file for the job.
Use the
bsub -is command if you need to change the original input file before the
job completes. Removing or modifying the original input file does not affect the
submitted job.
Unless you use
-is, you can use the special characters %J and %I in the name of the
input file.
%J is replaced by the job ID. %I is replaced by the index of the job in the array,
if the job is a member of an array, otherwise by 0 (zero). The special characters
%J and
%I are not valid with the -is option.
Specifying a job command file (bsub -Zs)
Use the bsub -Zs command to spool a job command file to the directory specified by
the JOB_SPOOL_DIR parameter in
lsb.params. LSF uses the spooled file as the
command file for the job.