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.

-- 
slurm-users mailing list -- slurm-users@lists.schedmd.com
To unsubscribe send an email to slurm-users-le...@lists.schedmd.com

Reply via email to