Question & Answer
Question
You submit blaunch jobs in the following pattern: blaunch node1 script01.sh >log01 2>&1 & blaunch node1 script02.sh >log02 2>&1 & blaunch node1 script03.sh >log03 2>&1 & ... blaunch node1 script16.sh >log16 2>&1 & blaunch node2 script17.sh >log17 2>&1 & blaunch node2 script18.sh >log18 2>&1 & blaunch node2 script19.sh >log19 2>&1 & ... blaunch node2 script32.sh >log32 2>&1 & The following error messages appear in the job output file: lsb_launch(): Failed while waiting for tasks to finish. Some tasks fail to finish successfully.
Answer
Solution:
Put a “wait” at the end of the job script, "wait" keeps the job script running until all background blaunch processes finish.
An example:
$ cat ./job1.sh
# LSBATCH: User input
#BSUB -I
#BSUB -n 128
#BSUB -R "type=any span[ptile=64]"
#BSUB -m "host01 host02"
#BSUB -o %J.out
for hname in `cat $LSB_DJOB_HOSTFILE`
do
blaunch $hname hostname &
done
wait
Results:
1 The following error messages disappear:
lsb_launch(): Failed while waiting for tasks to finish.
2 All tasks can finish successfully
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1019535