Yeah, it's tricky. I suggested the afterany to the researcher as well, but it 
wasn't compatible with their workflow as some jobs are allowed to run 
simultaneously, but they can still have dependencies on each other. They are 
using groups of singletons which I left out of the minimal working example to 
get to the core of the issue.

I think Kevin Buckley's interpretation is indeed what happens in that a 
circular dependency was created.
However, I'm still puzzled if that is by design or a potential bug in SLURM.

Any thoughts on that?

Thanks,
Jarno

Jarno van der Kolk, PhD Phys.
Analyste principal en informatique scientifique | Senior Scientific Computing 
Specialist
Solutions TI | IT Solutions
Université d’Ottawa | University of Ottawa


From: slurm-users <[email protected]> on behalf of Brian 
Andrus <[email protected]>
Sent: August 22, 2019 10:20 AM
To: [email protected] <[email protected]>
Subject: Re: [slurm-users] Dependencies with singleton and after
 
Hmm.

I've actually never used singleton and merely chained dependencies. Maybe you 
can do that as a workaround:

waitjob=$(sbatch --hold fakejob.sh |sed 's/Submitted batch job //')
for i in {1..2}; do
  echo Submitting $VAULT to run after ${waitjob}
  waitjob=$(sbatch -H --depend=afterany:${waitjob} fakejob.sh|sed 's/Submitted 
batch job //')
done

Of course, if you are actually running the exact same script, I would recommend 
using arrays as well.
Brian Andrus

Reply via email to