diff --git a/src/plugins/select/bluegene/bluegene.c b/src/plugins/select/bluegene/bluegene.c
index f64164479b0635b003ebece362e398101e5a0f03..4ec59120d594aabb9e8a125ee2aedc2e1529a0ca 100644
--- a/src/plugins/select/bluegene/bluegene.c
+++ b/src/plugins/select/bluegene/bluegene.c
@@ -57,10 +57,14 @@ int partitions_are_created = 0;
 bgl_record_t *full_system_partition = NULL;
 
 #ifdef HAVE_BGL_FILES
-static pthread_mutex_t freed_cnt_mutex = PTHREAD_MUTEX_INITIALIZER;
-static int _update_bgl_record_state(List bgl_destroy_list);
+  static pthread_mutex_t freed_cnt_mutex = PTHREAD_MUTEX_INITIALIZER;
+  static int _update_bgl_record_state(List bgl_destroy_list);
 #else
-int max_dim[PA_SYSTEM_DIMENSIONS] = { 0, 0, 0 };
+# if PA_SYSTEM_DIMENSIONS==3
+    int max_dim[PA_SYSTEM_DIMENSIONS] = { 0, 0, 0 };
+# else
+    int max_dim[PA_SYSTEM_DIMENSIONS] = { 0 };
+# endif
 #endif
 
 /* some local functions */