bsub

an example of job script job.sh

***************************************************

#!/bin/bash

#BSUB -J HS[1-96] # job name in a job array, needs to start from 1

#BSUB -n 1 # use 1 node

#BSUB -W 24:00 # wall time 24 hours

#BSUB -o job.out # output job status; otherwise will be sent to email

cd $PWD

# run the command

./exe > output

***************************************************

bsub bash job.sh

job arrays

***************************************************

#!/bin/bash

#BSUB -J HS[1-96] # job name in a job array, needs to start from 1

#BSUB -n 1 # use 1 node

#BSUB -W 24:00 # wall time 24 hours

#BSUB -o job.out # output job status; otherwise will be sent to email

cd $PWD

# run the command

sed -n "${LSB_JOBINDEX}p" TaskList | /bin/bash

***************************************************

where TaskList contains lines of executive command ./HSMD jobnumber

***************************************************

./HSMD 0 >> outputHS_0

./HSMD 1 >> outputHS_1

./HSMD 2 >> outputHS_2

./HSMD 3 >> outputHS_3

... ... ... ...

./HSMD 94 >> outputHS_94

./HSMD 95 >> outputHS_95

***************************************************

# submit jobs

bsub < job.sh

-q gerstein

-q interactive

-q shared

-q long

# monitor jobs

bjobs

bjobs -A

bjobs -l jobid # job details

bjobs -u all

JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME

13606 vaccaro RUN long grace0 20*c04n08 *DZ_OptNO2 Jun 15 02:52

15856 yc467 RUN shared grace0 c02n12 *0142_2_00 Jun 18 02:22

15881 yc467 RUN shared grace0 c02n12 *0002_1_00 Jun 18 03:30

... ... ... ...

qstat

# delete jobs

bkill jobid

bqueues # list of queues available on the cluster

QUEUE_NAME PRIO STATUS MAX JL/U JL/P JL/H NJOBS PEND RUN SUSP

gerstein 100 Open:Active 80 - - - 0 0 0 0

interactive 30 Open:Active - 1 - - 0 0 0 0

shared 20 Open:Active - - - - 10253 9022 1231 0

long 10 Open:Active 160 20 - - 46 0 46 0

bqueues -l

blimits

lshosts # list of cluster resources

HOST_NAME type model cpuf ncpus maxmem maxswp server RESOURCES

mgt1 X86_64 Intel_EM 60.0 8 63.9G 7.9G Yes (mg)

c06n12 X86_64 Intel_EM 60.0 20 127.9G 3.9G Yes ()

c06n11 X86_64 Intel_EM 60.0 20 127.9G 3.9G Yes ()

c01n01 X86_64 Intel_EM 60.0 20 127.9G 3.9G Yes (mg)

c01n02 X86_64 Intel_EM 60.0 20 127.9G 3.9G Yes ()

... ... ... ...

c06n09 X86_64 Intel_EM 60.0 20 127.9G 3.9G Yes ()

c06n10 X86_64 Intel_EM 60.0 20 127.9G 3.9G Yes ()

grace0 X86_64 Intel_EM 60.0 - - - No ()

grace1 X86_64 Intel_EM 60.0 - - - No ()

columbus X86_64 Intel_EM 60.0 - - - No ()