Ticket 1600 - nice to have array variables
Summary: nice to have array variables
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: Scheduling (show other tickets)
Version: 14.11.5
Hardware: Linux Linux
: 5 - Enhancement
Assignee: Moe Jette
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2015-04-15 09:09 MDT by Chris
Modified: 2015-09-10 07:38 MDT (History)
3 users (show)

See Also:
Site: D E Shaw Research
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed: 15.08.0
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
Description Chris 2015-04-15 09:09:18 MDT
Please consider this minor request for enhancement next time you are mucking with arrays or variables.

While looking at a users job array script today it occurred to me that we don't have access to a SLURM_TASK_STEPSIZE environment variable while running a slurm job array task (akin to that other TLA_TASK_STEPSIZE).  They happened to be keying off of the task index and processing five items and so were using a step size of five.  But I could imagine them wanting to change that size from five to ten or whatever and if they had an environment variable with the step size in it they could do a for loop with it.

It would be nice to have.  And as long as I am mentioning nice to have array variables I've seen TLA_TASK_FIRST and TLA_TASK_LAST used as well in the past.

sbatch -a n-m:s

SLURM_TASK_STEPSIZE = s
SLURM_TASK_FIRST = n
SLURM_TASK_LAST = m
Comment 1 Moe Jette 2015-04-15 09:20:11 MDT
Jason Bacon volunteered to do this about a month ago. I'll ask him if he has any update.
Comment 2 Chris 2015-04-15 09:45:22 MDT
Sweet! Nice to know I'm not the only person thinking they'd be nice to have:>

On 04/15/2015 05:20 PM, bugs@schedmd.com wrote:
> *Comment # 1 <http://bugs.schedmd.com/show_bug.cgi?id=1600#c1> on bug 1600 <http://bugs.schedmd.com/show_bug.cgi?id=1600> from Moe Jette <mailto:jette@schedmd.com> *
> 
> Jason Bacon volunteered to do this about a month ago. I'll ask him if he has
> any update.
> 
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 --
> You are receiving this mail because:
> 
>   * You reported the bug.
>
Comment 3 John Hanks 2015-08-11 21:58:45 MDT
I'd like to add a "me too" to this. We recently had a need for a job script to know when it was the last array element and had to parse that out of scontrol rather crudely.
Comment 4 Moe Jette 2015-08-27 06:34:18 MDT
Done:
https://github.com/SchedMD/slurm/commit/a15b8bd8fc3d0e50b0f479964f6cdd5d38d3a66c

This patch will likely apply cleanly to version 14.11 if you want to use that.
Comment 5 Chris 2015-09-10 03:34:58 MDT
Does ./src/slurmctld/job_mgr.c need this:

:%s/SLURM_TASK_ARRAY/SLURM_ARRAY_TASK/gc

to match the release notes and man page?


On 08/27/2015 02:34 PM, bugs@schedmd.com wrote:
> Moe Jette <mailto:jette@schedmd.com> changed bug 1600 
> <http://bugs.schedmd.com/show_bug.cgi?id=1600>
> What 	Removed 	Added
> Status 	UNCONFIRMED 	RESOLVED
> Version Fixed 		15.08.0
> Resolution 	--- 	FIXED
> Assignee 	brian@schedmd.com 	jette@schedmd.com
>
> *Comment # 4 <http://bugs.schedmd.com/show_bug.cgi?id=1600#c4> on bug 
> 1600 <http://bugs.schedmd.com/show_bug.cgi?id=1600> from Moe Jette 
> <mailto:jette@schedmd.com> *
> Done:
> https://github.com/SchedMD/slurm/commit/a15b8bd8fc3d0e50b0f479964f6cdd5d38d3a66c
>
> This patch will likely apply cleanly to version 14.11 if you want to use that.
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 6 Moe Jette 2015-09-10 07:38:39 MDT
The inconsistency corrected in commit later on that day:
https://github.com/SchedMD/slurm/commit/6a8c31bc61d16f220899c51d257511bfa9825223

Sorry for the confusion.