Jason Bacon <[email protected]> writes:

> How about SLURM_ARRAY_MIN_TASK_ID, SLURM_ARRAY_MAX_TASK_ID and
> SLURM_ARRAY_NUM_TASKS?
>
> I agree with Kilian's reasoning.  I think it's helpful to the end user
> to follow a pattern consistent with the --ntasks variables.
>
> FYI, SLURM_ARRAY_NUM_TASKS is the only one I would foresee myself
> using, but the others should be easy enough to add while I'm in
> there...

I agree that SLURM_ARRAY_NUM_TASKS is the most useful.

Instead of _MIN_TASK_ID and _MAX_TASK_ID another idea would be to have
something like SLURM_ARRAY_INDEXES with the full specification. Jobs
that do creative things can then parse that. (Or perhaps it should be
SLURM_ARRAY_INX to match SBATCH_ARRAY_INX).

sbatch --array=1,100 would result in SLURM_ARRAY_NUM_TASKS=2 and
SLURM_ARRAY_INDEXES=1,100

Regards,
Pär Lindfors

Reply via email to