Step 4. Running an X terminal Session Using LSF

This section shows how to create an X terminal session on a remote node using LSF. In this example, suppose that you want to use LSF to reserve 4 processors (2 nodes) and start an X terminal session on one of them.

First, check the available nodes on the HP XC system. For example:

$ sinfo

PARTITION AVAIL TIMELIMIT NODES STATE NODELIST

lsf

up infinite

2

idle n[46,48]

According to the information returned about this HP XC system, LSF has two nodes available for use, n46 and n48.

Determine the address of your monitor’s display server, as shown at the beginning of Section 10.2. You can start an X terminal session using this address information in a bsub command with the appropriate options. For example:

$ bsub -n4 -Ip srun -n1 xterm -display 14.26.206.134:0.0

Job <159> is submitted to default queue <normal>. <<Waiting for dispatch ...>>

<<Starting on lsfhost.localdomain>>

The options used in this command are:

-n4

allocate 4 processors

-Ip

interact with the X terminal session

srun -n1

run the job on 1 processor

xterm

the job is an X terminal session

-display <address>

monitor’s display server address

A remote X terminal session appears on your monitor. The X terminal session job is launched from node n47, which is the LSF execution host node. You can view this job using LSF and SLURM commands. For example:

$ sinfo

 

 

 

 

 

 

 

 

 

PARTITION AVAIL TIMELIMIT NODES

STATE NODELIST

 

 

 

lsf

up

infinite

2

alloc n[46,48]

 

 

 

$ squeue

 

 

 

 

 

 

 

 

JOBID

PARTITION

NAME

USER

ST

TIME

NODES

NODELIST

117

lsf

 

hptclsf@

username R

0:25

2

n[46,48]

$ bjobs

 

 

 

 

 

 

 

 

 

JOBID

USER

STAT QUEUE

FROM_HOST EXEC_HOST JOB_NAME

SUBMIT_TIME

119

lsfadmi RUN

norma

n48

4*n47

*8.136:0.0 date and time

You can now run some jobs from the X terminal session that you started and make use of the full allocation within the LSF node allocation. For example:

$ srun -n4 hostname n46

n48

n46

n48

$ srun -n2 hostname n46

n48

Exiting from the X terminal session ends the LSF job.

Advanced Topics 10-3

Page 133
Image 133
HP XC System 2.x Software manual Running an X terminal Session Using LSF, $ bsub -n4 -Ip srun -n1 xterm -display, $ bjobs