7 submitting a job from a non- hp xc host, Example 7-11, 7 submitting a job from a non-hp xc host – HP XC System 2.x Software User Manual

Page 100

Advertising
background image

Example 7-11: Submitting a Batch job Script That Uses the

srun --overcommit

Option

$ bsub -n4 -I ./myscript.sh "-n8 -O"

Job <81> is submitted to default queue <normal>.

<<Waiting for dispatch ...>>

<<Starting on lsfhost.localdomain>>

n1

n1

n1

n1

n2

n2

n2

n2

Hello world! I’m 0 of 8 on n1

Hello world! I’m 1 of 8 on n1

Hello world! I’m 2 of 8 on n1

Hello world! I’m 3 of 8 on n1

Hello world! I’m 4 of 8 on n2

Hello world! I’m 5 of 8 on n2

Hello world! I’m 6 of 8 on n2

Hello world! I’m 7 of 8 on n2

Example 7-12 shows some of the environment variables that are available in a batch script.

Example 7-12: Useful Environment Variables Available in a Batch Job Script

$ cat ./envscript.sh

#!/bin/sh

name=‘hostname‘

echo "hostname = $name"

echo "LSB_HOSTS = ’$LSB_HOSTS’"

echo "LSB_MCPU_HOSTS = ’$LSB_MCPU_HOSTS’"

echo "SLURM_JOBID = $SLURM_JOBID"

echo "SLURM_NPROCS = $SLURM_NPROCS"

$ bsub -n4 -I ./envscript.sh

Job <82> is submitted to default queue <normal>.

<<Waiting for dispatch ...>>

<<Starting on lsfhost.localdomain>>

hostname = n1

LSB_HOSTS = ’n1 n1 n2 n2’

LSB_MCPU_HOSTS = ’n1 2 n2 2’

SLURM_JOBID = 176

SLURM_NPROCS = 4

7.4.7 Submitting a Job from a Non-HP XC Host

You can submit a job from a non-HP XC host to the HP XC system. This can be accomplished
by adding a resource requirement string to the LSF command line. A resource requirement
string describes the resources a job needs. LSF uses resource requirements to select hosts for
remote execution and job execution. LSF then runs the job on a host that meets the specified
resource requirements.

To submit a job from a non-HP XC host to the HP XC system, use the LSF

-R

option, and

the HP XC host type

SLINUX64

(defined in

lsf.shared

) in the job submission resource

requirement string. The necessary resource requirement string to submit a job from a non-HP
XC host is specified as follows:

-R "type=SLINUX64"

7-16

Using LSF

Advertising