Search code examples
qsubtorque

torque qsub making jobs dependent on other jobs


I'd like to start a bunch of jobs using qsub, and the final job should only run if all the others finished "without error". In my case "without error" means they exited with status=0. The man page for qsub says in the -W depend=afterok description that: This job may be scheduled for execution only after jobs jobid have terminated with no errors.

Unfortunately it does not seem to explain (or I can't find) what it means by "with no errors". It is likely that some of my scripts will print information to stderr, but I don't want that to be interpreted as an error.

Question 1: What does the qsub documentation mean by "with no errors"? Question 2: How can I make a job dependent explicitly on all of a collection of jobs exiting with status 0?


Solution

    1. With no errors = exited with a status of 0. If the jobs exit with a non-zero exit status, it is considered an error.
    2. You can chain dependencies: qsub -W depend=afterok:job1:job2:job3