[slurm-users] Limit run time of interactive jobs
Ole Holm Nielsen
Ole.H.Nielsen at fysik.dtu.dk
Mon May 8 10:55:59 UTC 2023
On 5/8/23 08:39, Bjørn-Helge Mevik wrote:
> Angel de Vicente <angel.de.vicente at iac.es> writes:
>
>> But one possible way to something similar is to have a partition only
>> for interactive jobs and a different partition for batch jobs, and then
>> enforce that each job uses the right partition. In order to do this, I
>> think we can use the Lua contrib module (check the job_submit.lua
>> example).
>
> Wouldn't it be simpler to just refuse too long interactive jobs in
> job_submit.lua?
This sounds like a good idea, but how would one identify an interactive
job in the job_submit.lua script? A solution was suggested in
https://serverfault.com/questions/1090689/how-can-i-set-up-interactive-job-only-or-batch-job-only-partition-on-a-slurm-clu
> Interactive jobs have no script and job_desc.script will be empty / not set.
So maybe something like this code snippet?
if job_desc.script == NIL then
-- This is an interactive job
-- make checks of job timelimit
if job_desc.time_limit > 3600 then
slurm.log_user("NOTICE: Interactive jobs are limited to 3600 seconds")
-- ESLURM_INVALID_TIME_LIMIT in slurm_errno.h
return 2051
end
end
/Ole
More information about the slurm-users
mailing list