From 7d640b2f76305e1cf81efb32f56353860f9b5703 Mon Sep 17 00:00:00 2001
From: Mark Nelson <mdnelson8@gmail.com>
Date: Wed, 17 Apr 2013 01:34:07 -0700
Subject: [PATCH] BGQ - fix for handling half rack system in STATIC of OVERLAP
 mode to implicitly create full system block.

---
 src/plugins/select/bluegene/bg_defined_block.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/plugins/select/bluegene/bg_defined_block.c b/src/plugins/select/bluegene/bg_defined_block.c
index d659ec12e1e..c72f9ca3813 100644
--- a/src/plugins/select/bluegene/bg_defined_block.c
+++ b/src/plugins/select/bluegene/bg_defined_block.c
@@ -364,6 +364,17 @@ extern int create_full_system_block(List bg_found_block_list)
 				continue;
 
 			if (!strcmp(name, bg_record->mp_str)) {
+				/* if the whole system block is just one MP
+				 * we need to match on more than just the
+				 * name - if this bg_record doesn't have a
+				 * MP worth of c-nodes, skip it.
+				 */
+				if (!larger && bg_conf->mp_cnode_cnt
+						> bg_record->cnode_cnt)
+					continue;
+				debug2("create_full_system_block: not "
+				       "implicitly adding full system block -"
+				       " block already defined");
 				xfree(name);
 				list_iterator_destroy(itr);
 				/* don't create total already there */
-- 
GitLab