From 1687c77dde1a297b4c41209c24d12455f357bef4 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Mon, 6 Feb 2012 13:05:02 -0800
Subject: [PATCH] BGQ - add a couple of asserts to the mix until we are sure
 the last checkin fixed the problem

---
 src/plugins/select/bluegene/bg_record_functions.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c
index 7c9d322eb70..b4f4d0e0d08 100644
--- a/src/plugins/select/bluegene/bg_record_functions.c
+++ b/src/plugins/select/bluegene/bg_record_functions.c
@@ -1374,7 +1374,12 @@ extern int put_block_in_error_state(bg_record_t *bg_record, char *reason)
 	if (!block_ptr_exist_in_list(bg_lists->job_running, bg_record)) {
 		list_push(bg_lists->job_running, bg_record);
 		num_unused_cpus -= bg_record->cpu_cnt;
+	} else {
+		info("hey I was in the job_running table %d %d?",
+		     list_count(bg_record->job_list), num_unused_cpus);
+		xassert(0);
 	}
+
 	if (!block_ptr_exist_in_list(bg_lists->booted, bg_record))
 		list_push(bg_lists->booted, bg_record);
 
@@ -1497,6 +1502,7 @@ extern int bg_reset_block(bg_record_t *bg_record, struct job_record *job_ptr)
 	/* bg_record->boot_count = 0; */
 
 	last_bg_update = time(NULL);
+
 	/* Only remove from the job_running list if
 	   job_running == NO_JOB_RUNNING, since blocks in
 	   error state could also be in this list and we don't
@@ -1525,7 +1531,7 @@ extern int bg_reset_block(bg_record_t *bg_record, struct job_record *job_ptr)
 		error("Hey we are here with no jobs and we have only "
 		      "%d usuable cpus.  We should have %d!",
 		      num_unused_cpus, num_possible_unused_cpus);
-		//xassert(0);
+		xassert(0);
 		num_unused_cpus = num_possible_unused_cpus;
 	}
 
-- 
GitLab