You could use job_submit.lua for this:
local submit_part = job_desc.part
local submit_gres = job_desc.gres
if string.match(submit_part, "general") and submit_gres ~= "nil" then
slurm.log_user("Cannot submit to general partition with a GPU.")
return slurm.ERROR
end
I'm not sure what the exact return of job_desc.gres, it may not be nil.
You'll have to test that part.
There are probably other ways to do this, but I like to use the lua
plugin in order to communicate to my users what they have done wrong.
--
Nicholas McCollum
HPC Systems Administrator
Alabama Supercomputer Authority
On Thu, 2017-07-20 at 07:03 -0600, OZAN ARKAN CAN wrote:
> Hi all,
>
> I have two different partitions, one for the gpu usage and the other
> one for the general tasks. I want to prevent the job submission with
> gpu usage from the general partition. Is there a way to achieve this
> setting?
>
> Thanks.