I don't know why that happens (other than you're opening a comment and
not closing it, IIUC), but it would probably be less surprising to just
reject the submission than reduce the limit.
In the (rare...) case the user actually needs all the time requested,
you risk wasting resources. If you reject the job, user can decide to
change to another queue.
Diego
Il 06/03/2024 10:25, Gestió Servidors via slurm-users ha scritto:
Hello,
I’m writing a small lua script that for modify “TimeLimit” of a submited
job if user has configured a TimeLimit bigger that configured in the
partition. So, is TimeLimit for partition is, for example, 4 hours
(04:00:00) and user submit his/her job with a TimeLimit of 5 hours, lua
script modify this submit and forces “TimeLimit” to 4 hours for avoiding
that job remains at queue in state “pending” with reason “Partition Time
Limit…”.
I have written these lines:
function slurm_job_submit(job_desc, part_list, submit_uid)
--[[ my id is 1008; for testing purposes, lua only applies
to me --]]
if (job_desc.user_id == 1008) then
slurm.log_info("Submit job by me")
--[[ I check partition --]]
if (job_desc['partition'] == "nodo.q") then
--[[
if (job_desc['time_limit'] > 14400)
job_desc['time_limit'] = 14400
end
end
end
return slurm.SUCCESS
end
However, if I submit a job with TimeLimit of 5 hours, lua script doesn’t
modify submit and job remains “pending”…
What am I doing wrong?
Thanks.
--
Diego Zuccato
DIFA - Dip. di Fisica e Astronomia
Servizi Informatici
Alma Mater Studiorum - Università di Bologna
V.le Berti-Pichat 6/2 - 40127 Bologna - Italy
tel.: +39 051 20 95786
--
slurm-users mailing list -- slurm-users@lists.schedmd.com
To unsubscribe send an email to slurm-users-le...@lists.schedmd.com