0

I am running an array of a job in which I want the job (running the script job.sh) to have a dependency where it can't go to the scheduler until the previous array job has started and I can't seem to figure out how to code this

#!/bin/bash

#SBATCH --account=*******
#SBATCH --array=1-3
#SBATCH --time=00:05:00
#SBATCH --mem-per-cpu=256M
#SBATCH --dependency=???????
./job.sh >output$SLURM_ARRAY_TASK_ID.txt
exit

This will be used to scaled up so it can run 1000 versions of the code on a much larger time/memory/array size.

  • You mean that you need each job in the job array to be dependent on the previous job in the same job array? – Poshi May 10 '19 at 08:03
  • yes so that say the third item doesn't go into the scheduler until the second item starts – Dean Eaton May 10 '19 at 15:16
  • I'm not sure, but I think that it is not possible. You will have to start independent jobs with the proper dependencies, one job per every job that was expected to be in the array. – Poshi May 10 '19 at 19:29

0 Answers0