IBM Support

blaunch tasks fail with “lsb_launch(): Failed while waiting for tasks to finish.”

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

[{"Product":{"code":"SSETD4","label":"Platform LSF"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF016","label":"Linux"}],"Version":"7.0.6;7.6;8.0;8.0.2;8.1;8.1.1;8.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSWRJV","label":"IBM Spectrum LSF"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1019535