Oh, that's embarrassing! Sorry! I thought the environment variable alone wasn't 
working. 

Sent from my iPhone

> On Feb 27, 2015, at 8:58 AM, Magnus Jonsson <[email protected]> wrote:
> 
> Hi Aaron,
> 
> From my spank code: spank_get_item(sp, S_SLURM_RESTART_COUNT, &restartcount)
> 
> The S_SLURM_RESTART_COUNT "item" was added to the plugstack on my 
> request/patch.
> 
> But thanks for the concern :-)
> 
> Best regards,
> Magnus
> 
>> On 2015-02-27 14:44, Aaron Knister wrote:
>> 
>> Hi Magnus,
>> 
>> While I can't tell you OTTOMH why the behavior changed, I can suggest a 
>> different perhaps more spank-y way to do that. From within your spank 
>> function(s) use the spank_get_item call to get the restart count:
>> 
>> int restart_count;
>> 
>> // sp is the spank_t argument to your SPANK function
>> spank_get_item(sp, S_SLURM_RESTART_COUNT, &restart_count);
>> 
>> Hope that helps!
>> 
>> Sent from my iPhone
>> 
>>> On Feb 27, 2015, at 8:14 AM, Magnus Jonsson <[email protected]> wrote:
>>> 
>>> 
>>> It seams that the restart count in SPANK (prolog) is missing in resent 
>>> versions of Slurm.
>>> 
>>> I always returns 0 even if the jobs ha restarted.
>>> 
>>> It also seams that the "SLURM_RESTART_COUNT" environment is missing in the 
>>> epilog script (might be related).
>>> 
>>> I'm not sure when this was changed but I'm pretty sure it worked on in 2.6 
>>> (it was when we developed our tmpdir spank plugin).
>>> 
>>> "SLURM_RESTART_COUNT" is available in the job user environment.
>>> 
>>> /Magnus
>>> 
>>> --
>>> Magnus Jonsson, Developer, HPC2N, Umeå Universitet
> 
> -- 
> Magnus Jonsson, Developer, HPC2N, Umeå Universitet
> 

Reply via email to