From 1d98cbc65f88b71114badc0e313cff29477f7205 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Thu, 22 Apr 2010 16:05:13 +0000
Subject: [PATCH] Add logic to log a gres plugins allocated bitmap

---
 src/plugins/gres/gpu/gres_gpu.c | 8 ++++++++
 src/plugins/gres/nic/gres_nic.c | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/src/plugins/gres/gpu/gres_gpu.c b/src/plugins/gres/gpu/gres_gpu.c
index 6a4fbc92a87..673f3cceca8 100644
--- a/src/plugins/gres/gpu/gres_gpu.c
+++ b/src/plugins/gres/gpu/gres_gpu.c
@@ -373,6 +373,14 @@ extern void node_state_log(List gres_list, char *node_name)
 		info("  gpu_cnt found:%u configured:%u avail:%u alloc:%u",
 		     gres_ptr->gpu_cnt_found, gres_ptr->gpu_cnt_config,
 		     gres_ptr->gpu_cnt_avail, gres_ptr->gpu_cnt_alloc);
+		if (gres_ptr->gpu_bit_alloc) {
+			char tmp_str[128];
+			bit_fmt(tmp_str, sizeof(tmp_str), 
+				gres_ptr->gpu_bit_alloc);
+			info("  gpu_bit_alloc:%s", tmp_str);
+		} else {
+			info("  gpu_bit_alloc:NULL");
+		}
 	}
 	list_iterator_destroy(gres_iter);
 }
diff --git a/src/plugins/gres/nic/gres_nic.c b/src/plugins/gres/nic/gres_nic.c
index 2a79cd2491c..9999f79e6ac 100644
--- a/src/plugins/gres/nic/gres_nic.c
+++ b/src/plugins/gres/nic/gres_nic.c
@@ -373,6 +373,14 @@ extern void node_state_log(List gres_list, char *node_name)
 		info("  nic_cnt found:%u configured:%u avail:%u alloc:%u",
 		     gres_ptr->nic_cnt_found, gres_ptr->nic_cnt_config,
 		     gres_ptr->nic_cnt_avail, gres_ptr->nic_cnt_alloc);
+		if (gres_ptr->nic_bit_alloc) {
+			char tmp_str[128];
+			bit_fmt(tmp_str, sizeof(tmp_str), 
+				gres_ptr->nic_bit_alloc);
+			info("  nic_bit_alloc:%s", tmp_str);
+		} else {
+			info("  nic_bit_alloc:NULL");
+		}
 	}
 	list_iterator_destroy(gres_iter);
 }
-- 
GitLab