[slurm-users] cleanup script after timeout

Reuti reuti at staff.uni-marburg.de
Thu Dec 12 08:16:45 UTC 2019


Am 12.12.2019 um 03:06 schrieb Brian Andrus:

> You prompted me to dig even deeper into my epilog. I was trying to access a semaphore file in the user's home directory.
> It seems that when the epilogue is run the ~ is not expanded in anyway. So I can't even use ~${SLURM_JOB_USER} to access their semaphore file.

To use ~${SLURM_JOB_USER} it should be necessary to use `eval`, as it needs to be evaluated twice. More promising might be:

$ getent passwd ${SLURM_JOB_USER} | cut -d: -f6

-- Reuti

> Potentially problematic for any sites with homes in different locations or accounts with non-standard homes, but at least what I needed to do can work.
> Brian
> On 12/11/2019 3:44 PM, Juergen Salk wrote:
>> Hi Brian,
>> can you maybe elaborate on how exactly you verified that your epilog
>> does not run when a job exceeds it's walltime limit? Does it run when
>> the jobs end normally or when a running job is cancelled by the user?
>> I am asking because in our environment the epilog also runs when a job
>> hits the walltime limit or is cancelled and I think this is actually
>> how it is supposed to work.
>> Best regards
>> Jürgen

More information about the slurm-users mailing list