Command Reference Guide

Platform LSF Command Reference 181
Terminal support is available for a batch interactive job.
When you specify the
-Ip option, submits a batch interactive job and creates a
pseudo-terminal when the job starts. Some applications (for example,
vi) require a
pseudo-terminal in order to run correctly.
When you specify the
-Is option, submits a batch interactive job and creates a
pseudo-terminal with shell mode support when the job starts. This option should
be specified for submitting interactive shells, or applications which redefine the
CTRL-C and CTRL-Z keys (for example,
jove).
If the
-i input_file option is specified, you cannot interact with the jobs standard
input via the terminal.
If the
-o out_file option is specified, sends the jobs standard output to the specified
output file. If the
-e err_file option is specified, sends the jobs standard error to the
specified error file.
You cannot use
-I, -Ip, or -Is with the -K option.
Interactive jobs cannot be checkpointed.
Interactive jobs cannot be rerunnable (
bsub -r).
The options that create a pseudo-terminal (
-Ip and -Is) are not supported on
Windows.
-K Submits a batch job and waits for the job to complete. Sends the message "Waiting
for dispatch
" to the terminal when you submit the job. Sends the message "Job
is finished" to the terminal when the job is done.
You are not able to submit another job until the job is completed. This is useful
when completion of the job is required in order to proceed, such as a job script. If
the job needs to be rerun due to transient failures,
bsub returns after the job finishes
successfully.
bsub exits with the same exit code as the job so that job scripts can take
appropriate actions based on the exit codes.
bsub exits with value 126 if the job was
terminated while pending.
You cannot use the
-K option with the -I, -Ip, or -Is options.
-N Sends the job report to you by mail when the job finishes. When used without any
other options, behaves the same as the default.
Use only with
-o, -oo, -I, -Ip, and -Is options, which do not send mail, to force
LSF to send you a mail message when the job is done.
-r | -rn If the execution host becomes unavailable while a job is running, specifies that the
job be rerun on another host. LSF requeues the job in the same job queue with the
same job ID. When an available execution host is found, reruns the job as if it were
submitted new, even if the job has been checkpointed. You receive a mail message
informing you of the host failure and requeuing of the job.
If the system goes down while a job is running, specifies that the job is requeued
when the system restarts.
Reruns a job if the execution host or the system fails; it does not rerun a job if the
job itself fails.