From c08d280fcddabdf39dcfa3f37cb8df822f382d1e Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Thu, 19 May 2011 15:52:06 -0700
Subject: [PATCH] BLUEGENE - cleaned up some vestigal code

---
 src/plugins/select/bluegene/ba/block_allocator.c     | 5 +----
 src/plugins/select/bluegene/ba_bgq/block_allocator.c | 7 +++----
 src/plugins/select/bluegene/ba_common.c              | 5 +++--
 src/plugins/select/bluegene/ba_common.h              | 2 +-
 4 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/plugins/select/bluegene/ba/block_allocator.c b/src/plugins/select/bluegene/ba/block_allocator.c
index 84ff4e512ea..415669c1f3a 100644
--- a/src/plugins/select/bluegene/ba/block_allocator.c
+++ b/src/plugins/select/bluegene/ba/block_allocator.c
@@ -83,7 +83,6 @@ List best_path = NULL;
 int best_count;
 uint16_t *deny_pass = NULL;
 char *p = '\0';
-static int REAL_DIM_SIZE[HIGHEST_DIMENSIONS] = {0,0,0,0};
 
 /* extern Global */
 my_bluegene_t *bg = NULL;
@@ -1735,7 +1734,7 @@ static int _reset_the_path(ba_switch_t *curr_switch, int source,
 //	return 1;
 }
 
-extern void ba_create_system(int num_cpus, int *real_dims)
+extern void ba_create_system()
 {
 	int x,y,z, i = 0;
 
@@ -1744,8 +1743,6 @@ extern void ba_create_system(int num_cpus, int *real_dims)
 
 	best_count=BEST_COUNT_INIT;
 
-	memcpy(REAL_DIM_SIZE, real_dims, sizeof(REAL_DIM_SIZE));
-
 	ba_main_grid = (ba_mp_t***)
 		xmalloc(sizeof(ba_mp_t**) * DIM_SIZE[X]);
 	for (x=0; x<DIM_SIZE[X]; x++) {
diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c
index d4a9ab00dc1..579821d70a4 100644
--- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c
+++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c
@@ -65,7 +65,6 @@ typedef struct {
  *  on */
 ba_mp_t ****ba_main_grid = NULL;
 
-static int REAL_DIM_SIZE[HIGHEST_DIMENSIONS] = {0,0,0,0};
 static ba_geo_system_t *ba_main_geo_system = NULL;
 static ba_geo_system_t *ba_mp_geo_system = NULL;
 static uint16_t *deny_pass = NULL;
@@ -116,7 +115,7 @@ static bool _mp_used(ba_mp_t* ba_mp, int dim);
 /** */
 static bool _mp_out_used(ba_mp_t* ba_mp, int dim);
 
-extern void ba_create_system(int num_cpus, int *real_dims)
+extern void ba_create_system()
 {
 	int a,x,y,z, i = 0, dim;
 	uint16_t coords[SYSTEM_DIMENSIONS];
@@ -125,8 +124,6 @@ extern void ba_create_system(int num_cpus, int *real_dims)
 	if (ba_main_grid)
 		ba_destroy_system();
 
-	memcpy(REAL_DIM_SIZE, real_dims, sizeof(REAL_DIM_SIZE));
-
 	ba_main_grid = (ba_mp_t****)
 		xmalloc(sizeof(ba_mp_t***) * DIM_SIZE[A]);
 	for (a = 0; a < DIM_SIZE[A]; a++) {
@@ -170,8 +167,10 @@ extern void ba_create_system(int num_cpus, int *real_dims)
 	ba_main_geo_system->dim_count = SYSTEM_DIMENSIONS;
 	ba_main_geo_system->dim_size =
 		xmalloc(sizeof(int) * ba_main_geo_system->dim_count);
+
 	for (dim = 0; dim < SYSTEM_DIMENSIONS; dim++)
 		ba_main_geo_system->dim_size[dim] = DIM_SIZE[dim];
+
 	ba_create_geo_table(ba_main_geo_system);
 	//ba_print_geo_table(ba_main_geo_system);
 
diff --git a/src/plugins/select/bluegene/ba_common.c b/src/plugins/select/bluegene/ba_common.c
index 32cdd0acb55..5e2cacbab45 100644
--- a/src/plugins/select/bluegene/ba_common.c
+++ b/src/plugins/select/bluegene/ba_common.c
@@ -51,11 +51,12 @@ int cluster_base = 36;
 uint32_t cluster_flags = 0;
 uint16_t ba_deny_pass = 0;
 
+ba_geo_combos_t geo_combos[LONGEST_BGQ_DIM_LEN];
+
 bool ba_initialized = false;
 uint32_t ba_debug_flags = 0;
 int DIM_SIZE[HIGHEST_DIMENSIONS];
 bitstr_t *ba_main_mp_bitmap = NULL;
-ba_geo_combos_t geo_combos[LONGEST_BGQ_DIM_LEN];
 
 static void _pack_ba_connection(ba_connection_t *ba_connection,
 				Buf buffer, uint16_t protocol_version)
@@ -810,7 +811,7 @@ setup_done:
 
 		ba_main_mp_bitmap = bit_alloc(num_mps);
 
-		ba_create_system(num_cpus, real_dims);
+		ba_create_system();
 		bridge_setup_system();
 
 		_init_grid(node_info_ptr);
diff --git a/src/plugins/select/bluegene/ba_common.h b/src/plugins/select/bluegene/ba_common.h
index d6c3a76ae54..4404da9dd67 100644
--- a/src/plugins/select/bluegene/ba_common.h
+++ b/src/plugins/select/bluegene/ba_common.h
@@ -399,7 +399,7 @@ extern void set_ba_debug_flags(uint32_t debug_flags);
 extern void reset_ba_system(bool track_down_mps);
 
 /* in the respective block_allocator.c */
-extern void ba_create_system(int num_cpus, int *real_dims);
+extern void ba_create_system(void);
 extern void ba_destroy_system(void);
 
 /*
-- 
GitLab