Aaron Knister <[email protected]> writes:
> 2. Using a job submission filter. I'm not sure if this would work for your
> situation since I've never used it but it seems promising. The idea would
> be to use the submit filter to determine if the user specified a time
> argument. The job submit plugin documentation is here:
> http://www.schedmd.com/slurmdocs/job_submit_plugins.html and a sample lua
> filter can be found at contribs/lua/job_submit.lua in the source code.
We use a job_submit.lua script to enforce this. It works well (except
that we have forgotten to test for UNLIMITED. :-).
We use the following snippet to check for the time limit:
-- If walltime is missing: fail
-- (0xfffffffe is slurm's NO_VAL)
if job_desc.time_limit == 0xfffffffe then
log_info("slurm_job_submit: job from uid %d with missing time:
Denying.",
job_desc.user_id)
return 2051 -- Signal ESLURM_INVALID_TIME_LIMIT
end
--
Regards,
Bjørn-Helge Mevik, dr. scient,
Research Computing Services, University of Oslo