When submitting multiple jobs that need dependencies on each other at the same time via Deadline Command, I’m curious if I am doing it right and if there is a better way without having to call getJobIdsFilter repeatedly?
submit job #1, using a timestamp as comment
getJobIdsFilter comment=timestamp to get ID of job #1
submit job #2 with JobDependencies=ID and timestamp2 as comment
get ID from job #2 using timestamp2, pass that to job #3
repeat
If there is a better way to do this please let me know, thank you.
If the chain is linear, there’s also SubmitMultipleJobs from DeadlineCommand:
SubmitMultipleJobs
Submits multiple jobs at once.
[dependent] This flag makes each job in the list of jobs
specified dependent on the previous job. This is
shorthand for specifying -dependsonprevious for
each job being submitted
[notify] This flag displays a notification window after
the jobs have been submitted
[job <Job Files>] This flag must precede each list of files for
each individual job being submitted. You can
also add the -dependsonprevious flag to make a
single job dependent on the previous job