From 27ccc04dcefeaf163f59eae10f897ce3ca8a801b Mon Sep 17 00:00:00 2001
From: jette <jette@schedmd.com>
Date: Tue, 4 Dec 2012 09:38:33 -0800
Subject: [PATCH] Fix for job allocation API with requested nodes and
 continguous not set explicitly

---
 src/slurmctld/job_mgr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c
index 2712749e5a0..c9f3ddf25bb 100644
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -3914,7 +3914,8 @@ static int _job_create(job_desc_msg_t * job_desc, int allocate, int will_run,
 			error_code = ESLURM_INVALID_NODE_NAME;
 			goto cleanup_fail;
 		}
-		if (job_desc->contiguous)
+		if ((job_desc->contiguous != (uint16_t) NO_VAL) &&
+		    (job_desc->contiguous))
 			bit_fill_gaps(req_bitmap);
 		i = bit_set_count(req_bitmap);
 		if (i > job_desc->min_nodes)
-- 
GitLab