[slurm-users] TimeLimit parameter
Gestió Servidors
sysadmin.caos at uab.cat
Fri Dec 3 10:11:50 UTC 2021
Hi,
Answering between lines...
> Hi;
>
> The EnforcePartLimits parameter in slurm.conf, should be set to ALL or ANY
> to enforce time limit for partition.
>
> Regards.
>
> Ahmet M.
I have not configured "EnforcePartLimits" in my slurm.conf file, so I suppose that my SLURM is running with "default" value "NO", so my job will be accept and remain queued until the partition limits are altered (as SLURM documentation says and me too ;) )
>I look at it this way (so it makes sense):
>
>It goes into a pending state because it is possible for the time to become available (you could just run a command that increases the
>timelimit) so it is waiting for that to happen. This is useful because you may have some users have a job that does indeed need to go that long, but they have to let you know to allow it to happen.
>
>If you do not want ANY jobs to queue up if they are asking for more time than is available, you can add some code to the job_submit.lua
>
>Here is a snippet from mine:
>
>?? if time_limit > part_max_time then
> ?????? slurm.log_info("job from uid %d with request for more than
>max_time: Denying.",job_desc.user_id)
> ?????? slurm.log_user("You cannot request more than %s minutes in partition %s!!", part_max_time, partition) ?????? return slurm.ESLURM_INVALID_TIME_LIMIT ?? end>
>
>The time_limit, part_max_time and partition variables are mapped from job_desc and part_list
>
>Brian Andrus
I think solution modifying “lua” script is a good solution. Could I do something like this?
if time_limit > part_max_time then
slurm.log_info("job from uid %d with request for more than max_time: Reconfiguring your job.",job_desc.user_id)
slurm.log_user("You cannot request more than %s minutes in partition %s!!", part_max_time, partition)
time_limit=part_max_time
end
return slurm.ESLURM_INVALID_TIME_LIMIT
In other words: if a user submits a jobs with TimeLimit bigger than partition TimeLimit, assign partition TimeLimit to his/her job.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20211203/b6d088a7/attachment-0001.htm>
More information about the slurm-users
mailing list