Platform LSF Administration Guide Version 6.2

Submitting Interactive Jobs
Administering Platform LSF
518
When you specify the -Ip option, bsub submits a batch interactive job and creates a
pseudo-terminal when the job starts. Some applications such as
vi for example, require
a pseudo-terminal in order to run correctly.
For example:
%
bsub -Ip vi myfile
Submits a batch interactive job to edit myfile.
bsub -Is
To submit a batch interactive job and create a pseudo-terminal with shell mode support,
use the
bsub -Is option.
When you specify the
-Is option, bsub 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).
Example:
%
bsub -Is csh
Submits a batch interactive job that starts up csh as an interactive shell.
Submitting an interactive job and redirect streams to files
bsub -i, -o, -e
It is possible to use the -I option together with the -i, -o, and -e options of bsub to
selectively redirect streams to files. For more details, see the
bsub(1) man page.
For example:
%
bsub -I -q interactive -e job.err lsmake
Saves the standard error stream in the job.err file, while standard input and standard
output come from the terminal.
Split stdout and
stderr
If in your environment there is a wrapper around bsub and LSF commands so that end-
users are unaware of LSF and LSF-specific options, you redirect standard output and
standard error of batch interactive jobs to a file with the > operator.
By default, both standard error messages and output messages for batch interactive jobs
are written to
stdout on the submission host.
For example:
%
bsub -I myjob 2>mystderr 1>mystdout
In the above example, both stderr and stdout are written to mystdout.
To redirect both
stdout and stderr to different files, set
LSF_INTERACTIVE_STDERR=y in
lsf.conf or as an environment variable. For
example, with LSF_INTERACTIVE_STDERR set:
%
bsub -I myjob 2>mystderr 1>mystdout
stderr is redirected to mystderr, and stdout to mystdout.
See the Platform LSF Reference for more details on LSF_INTERACTIVE_STDERR.