That information is not current available, but it should be easy to add with a few lines of code in src/sbatch/opt.c. If you do this, please forward the patch so it can be added to the Slurm code base.


Quoting Jean-Christophe Domenge <jc.dome...@gmail.com>:
When I submit an array job using *sbatch  --array:1-N myscript.sh *the task
id is passed at runtime to *myscript.sh* via the environment variable
SLURM_ARRAY_TASK_ID.
But how can I access *N* (the number of tasks in the array job) in
*myscript.sh*?

This is especially useful when splitting a list into *N* slices with each
task in the array job handling a different slice.

Thanks for your help,

jc


--
Morris "Moe" Jette
CTO, SchedMD LLC
Commercial Slurm Development and Support

Reply via email to