Restrict the user to use up to 5 cores on nodeA, 5 cores on nodeB and 1 GPU on nodeA, 1 GPU on nodeB only

Hi,

I am looking for the commands that will restrict the user foo to use up to 10 Cores and 2 GPUs only,
nodeA 5 core + nodeB 5core + 1 GPU from nodeA + 1 GPU from nodeB
If he submitting job with 11 core reject the job,
If he submitting multiple 10 Core job with 1 or 2 GPU then if resource free within the 5 core + 5 core + 1 GPU + 1 GPU then allow the job to executed if not put it in the queue.

Thanks.

Please try this :

qmgr -c “s q gpuq max_run_res.ncpus='[u:foo=10]]”
qmgr -c “s q gpuq max_run_res.ngpus='[u:foo=2]]”

qsub -l select=1:ncpus=5:ngpus=1+1:ncpus=5:ncpus=1

Refer:

Table 4-1: Server Attributes Involved in Scheduling

Refer hooks guide: High-performance Computing (HPC) and Cloud Solutions | Altair
Example 9-5: Calculate and set custom resource

Please use a queuejob hook to get the total number of cores requested by the job, if it exceeds 11 cores reject the job

Please use the queuejob hook to modify the select statement based on user qsub request

Thank you