[slurm-users] introduce short delay starting multiple parallel jobs with srun

Gennaro Oliva oliva.g at na.icar.cnr.it
Thu Nov 9 07:40:08 MST 2017

Hi Renat,

On Thu, Nov 09, 2017 at 03:09:17PM +0100, Yakupov, Renat /DZNE wrote:
> I would like some suggestions on how to spread out in time the start
> of multiple parallel jobs with srun.

I would use:

sbatch --array=...

As far as I know srun doesn't support arrays.

> Is there a way to get a task number? I know there is
> SLURM_ARRAY_TASK_ID variable, but all job array related variables dont
> work for me. I guess, job array capabilities arent enable on our

environment variables should work under sbatch, so you can use something

sleep $((SLURM_ARRAY_TASK_ID*5))

where array index ranges from 0 to n-1.
Gennaro Oliva

More information about the slurm-users mailing list