From 34a8043e3a3209f4ca14f1d20065ba814a55ab78 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Thu, 2 Oct 2008 21:27:41 +0000
Subject: [PATCH] Fix for use of --overcomment with --tasks-per-node

---
 src/plugins/select/cons_res/job_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/select/cons_res/job_test.c b/src/plugins/select/cons_res/job_test.c
index f6602eb2061..5392363841e 100644
--- a/src/plugins/select/cons_res/job_test.c
+++ b/src/plugins/select/cons_res/job_test.c
@@ -1713,7 +1713,7 @@ alloc_job:
 	 * For cons_res, all available logical processors will be allocated on
 	 * each allocated node in order to accommodate the overcommit request.
 	 */
-	if (job_ptr->details->overcommit)
+	if (job_ptr->details->overcommit && job_ptr->details->num_tasks)
 		job_res->nprocs = MIN(total_cpus, job_ptr->details->num_tasks);
 
 	debug3("cons_res: cr_job_test: job %u nprocs %u cbits %u/%u nbits %u",
-- 
GitLab