Ole Holm Nielsen <ole.h.niel...@fysik.dtu.dk> writes:

> On 5/8/23 08:39, Bjørn-Helge Mevik wrote:
>> Angel de Vicente <angel.de.vice...@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

Attachment: signature.asc
Description: PGP signature

Reply via email to