Example 7-21: running jobs from an xterm window, 2 submitting an interactive job to launch a shell – HP XC System 2.x Software User Manual
Page 106

Example 7-20: View Job Details in LSF (cont.)
date and time stamp: Dispatched to 4 Hosts/Processors
<4*lsfhost.localdomain>
;
date and time stamp: slurm_id=105;ncpus=4;slurm_alloc=n[1-4];
date and time stamp: Starting (Pid 13938);
Summary of time in seconds spent in various states by
date and time stamp
PEND
PSUSP
RUN
USUSP
SSUSP
UNKWN
TOTAL
9
0
251
0
0
0
260
Example 7-21: Running Jobs from an
xterm
Window
$ hostname
n1
$ srun hostname
n1
n2
n3
n4
$ srun -n2 hostname
n1 n2
When you finish with your interactive session, exit from the terminal window. This completes
your job in LSF-HPC.
7.6.2 Submitting an Interactive Job to Launch a Shell
You can submit an interactive shell, such as the Korn shell or
bash
, as the
jobname
parameter
when you submit a job to LSF-HPC; however, the interaction with the launched shell program
is limited. Example 7-22 shows such a job submission:
Example 7-22: Submitting an Interactive Shell Program
$ bsub -Is -n4 -ext "SLURM[nodes=4]" /bin/bash
Job <95> is submitted to default queue
<
<
hostname
n1
srun hostname
n1
n1
n2
n2
exit
$
The obvious limitation is the absence of the shell prompt. Signal support is also limited.
The job starter script uses the
srun
command to execute a job on the first allocated node
instead of the LSF execution host. The
srun
command does not provide full
tty
support; it
simply executes the program it was given and sets up I/O connections for
STDIN
,
STDOUT
,
and
STDERR
of the program back to the launching process.
If this type of interaction is needed often, ask the system administrator to configure a special
queue in LSF-HPC that does not have a job starter script configured. This provides a more
7-22
Using LSF