From 3d62c2868eddeee6f99c3e47bd45f1c9e5f74312 Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Fri, 24 Jan 2014 16:28:14 -0800
Subject: [PATCH] Allocate whole node in with --exclusive

With select/cons_res plugin and a job using the --exclusive option
if the partition supports gang scheduling or mutliple jobs per node,
then allocate CPUs to multiple jobs, but allocate the job every
CPU on each node.
---
 src/plugins/select/cons_res/dist_tasks.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c
index 826d00008fc..bbf621cd590 100644
--- a/src/plugins/select/cons_res/dist_tasks.c
+++ b/src/plugins/select/cons_res/dist_tasks.c
@@ -899,7 +899,8 @@ extern int cr_dist(struct job_record *job_ptr, const uint16_t cr_type)
 {
 	int error_code, cr_cpu = 1;
 
-	if ((job_ptr->job_resrcs->node_req == NODE_CR_RESERVED) &&
+	if (((job_ptr->job_resrcs->node_req == NODE_CR_RESERVED) ||
+	     (job_ptr->details->whole_node != 0)) &&
 	    (job_ptr->details->core_spec == 0)) {
 		/* the job has been allocated an EXCLUSIVE set of nodes,
 		 * so it gets all of the bits in the core_bitmap and
-- 
GitLab