[slurm-users] Limit run time of interactive jobs
Bjørn-Helge Mevik
b.h.mevik at usit.uio.no
Mon May 8 13:17:20 UTC 2023
Ole Holm Nielsen <Ole.H.Nielsen at fysik.dtu.dk> writes:
> 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?
Good question. :) I merely guessed it is possible. :)
> 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
That sounds like it should work, yes. (But perhaps double check that jobs
submitted with "sbatch --wrap" or taking the job script from stdin (if
that is still possible) get job_descr.script set.)
--
B/H
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20230508/223a0616/attachment.sig>
More information about the slurm-users
mailing list