From 0456a6fad6c7600b911ea7b46f9102288ee14b55 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Tue, 1 Apr 2003 22:26:49 +0000
Subject: [PATCH] Fix handling of Immediate allocation request when user
 specifies processor count (*not* node count) and exceeds the partition's node
 limit for a job.

---
 src/slurmctld/node_mgr.c       | 4 +++-
 src/slurmctld/node_scheduler.c | 4 +---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c
index df6b5690813..79a6ca65f3d 100644
--- a/src/slurmctld/node_mgr.c
+++ b/src/slurmctld/node_mgr.c
@@ -1253,7 +1253,9 @@ void ping_nodes (void)
 						slurmctld_conf.last_update;
 
 		/* Request a node registration if its state is UNKNOWN or DOWN 
-		 * and periodically otherwise (about every 17th ping) */
+		 * and periodically otherwise (about every 17th ping, this 
+		 * mechanism avoids an additional timer or counter and gets 
+		 * updated configuration information once in a while) */
 		if ((base_state == NODE_STATE_UNKNOWN) || 
 		    (base_state == NODE_STATE_DOWN   ) || force_reg) {
 			debug3 ("attempt to register %s now", 
diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c
index 33d06d59c9d..6f7fb52f5c8 100644
--- a/src/slurmctld/node_scheduler.c
+++ b/src/slurmctld/node_scheduler.c
@@ -631,9 +631,7 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size,
 							*req_bitmap, min_nodes,
 							max_nodes, req_cpus, 
 							contiguous);
-			if ((pick_code == SLURM_SUCCESS) &&
-			    ((node_lim == INFINITE) ||
-			     (bit_set_count(avail_bitmap) <= node_lim)))
+			if (pick_code == SLURM_SUCCESS)
 				runable = true;
 		}
 		FREE_NULL_BITMAP(avail_bitmap);
-- 
GitLab