From 603a8c833944612bbbb45a1267f38846bae52c97 Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Tue, 22 Sep 2015 14:18:46 +0200 Subject: [PATCH] mxqd: Limit maximum number of jobs when requested by user this finally implements https://github.molgen.mpg.de/mariux64/mxq/issues/28 --- mxqd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mxqd.c b/mxqd.c index 6d4c340..e923b06 100644 --- a/mxqd.c +++ b/mxqd.c @@ -446,6 +446,10 @@ void group_init(struct mxq_group_list *group) } jobs_max /= g->job_threads; + /* limit maximum number of jobs on user/group request */ + if (jobs_max > g->job_max_per_node) + jobs_max = g->job_max_per_node; + slots_max = jobs_max * slots_per_job; memory_max = jobs_max * g->job_memory;