[slurm-users] submit_plugin.lua: distinguish between batch and interactive usage
Lech Nieroda
lech.nieroda at uni-koeln.de
Mon Dec 7 14:55:56 UTC 2020
Hello,
It’s certainly possible to check whether the job is interactive or not, e.g.
if job_desc.script == nil or job_desc.script == '' then
slurm.log_info("slurm_job_submit: jobscript is missing, assuming interactive job")
else
slurm.log_info("slurm_job_submit: jobscript is present, assuming non-interactive job")
if is_defined(job_desc.partition) and job_desc.partition == "interactive“ then
slurm.log_info("slurm_job_submit: interactive partition for non-interactive job, abort“)
slurm.log_user("submit_job: ERROR: batch jobs are not allowed in the interactive partition. Use salloc followed by srun instead.“)
return -1
end
end
Kind regards,
Lech
> Am 07.12.2020 um 15:31 schrieb Loris Bennett <loris.bennett at fu-berlin.de>:
>
> Hi,
>
> I would like to restrict interactive usage by, say, having a lower
> maximum run-time for interactive jobs.
>
> Is there checking the value of job_desc.script the best way of
> determining whether a job has been submitted via sbatch or not?
>
> Cheers,
>
> Loris
>
> --
> Dr. Loris Bennett (Hr./Mr.)
> ZEDAT, Freie Universität Berlin Email loris.bennett at fu-berlin.de
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5221 bytes
Desc: not available
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20201207/21224c6a/attachment-0001.bin>
More information about the slurm-users
mailing list