HP XC System Software Administration Guide Version 4.0

Table Of Contents
16.9 Maintaining Shell Prompts in LSF Interactive Shells
Launching an interactive shell under LSF with SLURM removes shell prompts.
LSF with SLURM makes use of a JOB_STARTER script for all queues; this script is configured
by default. It uses the SLURM srun command to ensure that user jobs run on the first node in
the allocation instead of the node from which the job was invoked.
Follow this procedure to edit the JOB_STARTER script to prevent the removal of shell prompts:
1. Log in as superuser (root).
2. Create a new directory, /hptc_cluster/lsf/bin:
# mkdir /hptc_cluster/lsf/bin
3. Copy the JOB_STARTER script to this new directory:
# cp /opt/hptc/lsf/bin/job_starter.sh /hptc_cluster/lsf/bin/
4. Use the text editor of your choice to edit the copied file as follows:
a. Open the file.
b. Locate the line with the /opt/hptc/bin/srun command:
/opt/hptc/bin/srun -n1 -X /bin/env -u SLURM_NNODES -u SLURM_DISTRIBUTION \
c. Add the -u option as the first argument to the /opt/hptc/bin/srun command:
/opt/hptc/bin/srun -u -n1 -X /bin/env -u SLURM_NNODES -u SLURM_DISTRIBUTION \
d. Save the file and close the text editor.
5. Use the text editor of your choice to update the /opt/hptc/lsf/etc/configdir/
lsb.queues file:
a. Open the file.
b. Locate the line in which the JOB_STARTER parameter is defined for the queue:
JOB_STARTER = /opt/hptc/lsf/bin/job_starter.sh
NOTE: This line is repeated for each queue.
c. Change the definition to point to the new JOB_STARTER script:
JOB_STARTER = /hptc_cluster/lsf/bin/job_starter.sh
d. Repeat steps b and c to make the same change for all queues.
e. Save the file and close the text editor.
6. Determine the LSF execution host:
# controllsf show current
7. Log in to the LSF execution host.
8. Enter the following command to update the queue configuration to use the new
JOB_STARTER script:
# badmin reconfig
To verify the change, submit an interactive job similar to the following:
[lsfadmin@n16 ~]$hostname
n16
[lsfadmin@n16 ~]$ bsub -Is -n8 /bin/bash -i
Job <261> is submitted to the default queue <interactive>.
<<Waiting for dispatch ...>>
<<Starting on lsf.localdomain>>
[lsfadmin@n4 ~]$ hostname
n4
[lsfadmin@n4 ~]$ srun hostname
n4
n4
200 Managing LSF