Home » Questions » Computers [ Ask a new question ]

Wait for one or all LSF jobs to complete

Wait for one or all LSF jobs to complete

With Platform LSF, is there a command that will wait for either a specific job or all my submitted jobs to finish before returning? In other words, I am looking for the LSF equivalent of the wait built-in command in bash.

Asked by: Guest | Views: 306
Total answers/comments: 1
Guest [Entry]

"If you give the -K option to bsub, it will wait for the job to complete before returning. You can then background several bsub commands in the shell and use the shell's wait command to wait for them. Example:

#!/bin/bash
bsub -K -o out.1 sleep 10 &
bsub -K -o out.2 sleep 5 &
wait"