From fcb7e94b83c51ba1f705d18f7c1f1ca11dd7024d Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Wed, 26 Jan 2005 21:39:35 +0000
Subject: [PATCH] Set psetnum (I/O node code) at bglblock creation time (the
 IBM API is  broken at this time, so this is just a placeholder for now).

---
 NEWS                                        | 4 ++++
 src/plugins/select/bluegene/bluegene.h      | 1 +
 src/plugins/select/bluegene/partition_sys.c | 3 +++
 3 files changed, 8 insertions(+)

diff --git a/NEWS b/NEWS
index 6babb3cd9ba..ce27615e07a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,10 @@
 This file describes changes in recent versions of SLURM. It primarily
 documents those changes that are of interest to users and admins. 
 
+* Changes in SLURM 0.4.0 (production release)
+=============================================
+ -- Specify number of I/O nodes associated with BlueGene partition
+
 * Changes in SLURM 0.4.0-pre9
 =============================
  -- Change in /etc/init.d/slurm for RedHat and Suze compatability
diff --git a/src/plugins/select/bluegene/bluegene.h b/src/plugins/select/bluegene/bluegene.h
index 673c6ad9bb0..e44785d3151 100644
--- a/src/plugins/select/bluegene/bluegene.h
+++ b/src/plugins/select/bluegene/bluegene.h
@@ -67,6 +67,7 @@
 #include "bgl_job_run.h"
 #include "state_test.h"
 
+#define PSETS_PER_BP 8
 #define USER_NAME "nobody"
 
 /* Global variables */
diff --git a/src/plugins/select/bluegene/partition_sys.c b/src/plugins/select/bluegene/partition_sys.c
index da127dc1055..273b333ef48 100755
--- a/src/plugins/select/bluegene/partition_sys.c
+++ b/src/plugins/select/bluegene/partition_sys.c
@@ -89,6 +89,8 @@ static void _print_list(List list)
  */
 static void _pre_allocate(bgl_record_t *bgl_record)
 {
+	int psets = (PSETS_PER_BP * bgl_record->bp_count);
+
 	rm_set_data(bgl_record->bgl_part, RM_PartitionBlrtsImg,   
 		bluegene_blrts);
 	rm_set_data(bgl_record->bgl_part, RM_PartitionLinuxImg,   
@@ -101,6 +103,7 @@ static void _pre_allocate(bgl_record_t *bgl_record)
 		&bgl_record->conn_type);
 	rm_set_data(bgl_record->bgl_part, RM_PartitionMode, 
 		&bgl_record->node_use);
+	rm_set_data(bgl_record->bgl_part, RM_PartitionPsetNum, &psets); 
 	rm_set_data(bgl_record->bgl_part, RM_PartitionUserName, USER_NAME);
 }
 
-- 
GitLab