beautypg.com

HP XC System 3.x Software User Manual

Page 55

background image

Example 5-17 Submitting a Batch job Script That Uses the srun --overcommit Option

$ bsub -n4 -I ./myscript.sh

Job <81> is submitted to default queue .

<>

<>

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 5-18

shows some of the environment variables that are available in a batch script. The LSB_HOSTS

and LSB_MCPU_HOSTS environment variables are defined in Platform LSF Reference. The SLURM_JOBID
and SLURM_NPROCS environment variables are defined in the SLURM Reference Manual.

Example 5-18 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 .

<>

<>

hostname = n1

LSB_HOSTS = 'n1 n1 n2 n2'

LSB_MCPU_HOSTS = 'n1 2 n2 2'

SLURM_JOBID = 176

SLURM_NPROCS = 4

5.5 Submitting a Job from a Host Other Than an HP XC Host

To submit a job from a host other than an 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 host other than an HP XC host
is specified as follows:

-R "type=SLINUX64"

The following example shows this resource requirement string in an LSF command:

$ bsub -R "type=SLINUX64" -n4 -I srun hostname

5.5 Submitting a Job from a Host Other Than an HP XC Host

55