I have some jobs started with sbatch, e.g.
a=$(sbatch ...)
b=$(sbatch ...)
Now a third job is queued after a or b are done:
c=$(sbatch --dependency=afterany:$a:$b ...)
How can I pass the exit status of task a and b to the script of c?
I have some jobs started with sbatch, e.g.
a=$(sbatch ...)
b=$(sbatch ...)
Now a third job is queued after a or b are done:
c=$(sbatch --dependency=afterany:$a:$b ...)
How can I pass the exit status of task a and b to the script of c?
You have several options;
c
read a file on disk, that is produced by a
and b
;have c
use sacct
to retrieve the status of a
and b
:
sacct -X -n -o state -j $a