From b7667bf6a4648140103e39581b20936b4cea86f6 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Wed, 7 Nov 2007 00:12:06 +0000
Subject: [PATCH] svn merge -r12627:12633
 https://eris.llnl.gov/svn/slurm/branches/slurm-1.2

---
 NEWS                      |  2 ++
 doc/html/bluegene.shtml   | 20 +++++++++++++++++++-
 src/common/hostlist.c     |  4 ----
 src/sview/part_info.c     |  2 +-
 testsuite/expect/test1.32 | 12 ++++++------
 testsuite/expect/test10.5 | 11 ++++++++++-
 testsuite/expect/test10.6 | 11 ++++++++++-
 7 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/NEWS b/NEWS
index 76e14a3ab1f..b545e02edfd 100644
--- a/NEWS
+++ b/NEWS
@@ -84,6 +84,8 @@ documents those changes that are of interest to users and admins.
     forwarding is done for PMI (MPICH2). See "man srun" for details.
  -- From sbatch set SLURM_NTASKS_PER_NODE when --ntasks-per-node option is 
     specified.
+ -- BLUEGENE: Documented the prefix should always be lower case and the 3
+    digit suffix should be uppercase if any letters are used as digits. 
 
 * Changes in SLURM 1.2.19
 =========================
diff --git a/doc/html/bluegene.shtml b/doc/html/bluegene.shtml
index a0e92e54145..96a7da97024 100644
--- a/doc/html/bluegene.shtml
+++ b/doc/html/bluegene.shtml
@@ -82,7 +82,7 @@ date
  
 <h3><a name="naming">Naming Convensions</a></h3>
 <p>The naming of base partitions includes a three-digit suffix representing the its 
-coordinates in the X, Y and Z dimensions with a zero origin.
+coordinates in the X, Y and Z dimensions with a zero origin.  
 For example, "bg012" represents the base partition whose coordinate is at X=0, Y=1 and Z=2.  In a system 
 configured with <i>small blocks</i> (any block less than a full base partition) there will be divisions
 into the base partition notation.  For example, if there were 64 psets in the
@@ -99,6 +99,24 @@ For example, "bg[620x731]" is used to represent the eight base partitions enclos
 with endpoints bg620 and bg731 (bg620, bg621, bg630, bg631, bg720, bg721, 
 bg730 and bg731).</p></a>
 
+<p>
+<b>IMPORTANT:</b> As of SLURM version 1.2 SLURM can handle a bluegene
+system of size 36x36x36.  To try to keep with the 'three-digit suffix  
+representing the its coordinates in the X, Y and Z dimensions with a
+zero origin', we now support A-Z as valid numbers.  This makes it so
+the prefix <b>must always be lower case</b>, and any letters in the 
+three-digit suffix <b> must always be upper case</b>.  This schema
+should be used in your slurm.conf file and in your bluegene.conf file
+if you put a prefix there even though it is not necessary there.  This
+schema should also be used to specify midplanes or locations in
+configure mode of smap.
+
+<br>
+valid: bgl[000xC44] bgl000 bglZZZ
+<br>
+invalid: BGL[000xC44] BglC00 bglb00 Bglzzz
+</p>
+
 <p>One new tool provided is <i>smap</i>. 
 As of SLURM verison 1.2, <i>sview</i> is
 another new tool offering even more viewing and configuring options.
diff --git a/src/common/hostlist.c b/src/common/hostlist.c
index 825e6e33848..ccd3083c423 100644
--- a/src/common/hostlist.c
+++ b/src/common/hostlist.c
@@ -1569,8 +1569,6 @@ static int _parse_box_range(char *str, struct _range *ranges, int len, int *coun
 	for(i = 0; i<3; i++) {
 		if ((str[i] >= '0') && (str[i] <= '9'))
 			a[i] = str[i] - '0';
-		else if ((str[i] >= 'a') && (str[i] <= 'z'))
-			a[i] = str[i] - 'a' + 10;
 		else if ((str[i] >= 'A') && (str[i] <= 'Z'))
 			a[i] = str[i] - 'A' + 10;
 		else
@@ -1578,8 +1576,6 @@ static int _parse_box_range(char *str, struct _range *ranges, int len, int *coun
 
 		if ((str[i+4] >= '0') && (str[i+4] <= '9'))
 			b[i] = str[i+4] - '0';
-		else if ((str[i+4] >= 'a') && (str[i+4] <= 'z'))
-			b[i] = str[i+4] - 'a' + 10;
 		else if ((str[i+4] >= 'A') && (str[i+4] <= 'Z'))
 			b[i] = str[i+4] - 'A' + 10;
 		else
diff --git a/src/sview/part_info.c b/src/sview/part_info.c
index 6a62205864b..628c650dace 100644
--- a/src/sview/part_info.c
+++ b/src/sview/part_info.c
@@ -857,7 +857,7 @@ static void _layout_part_record(GtkTreeView *treeview,
 	
 #ifdef HAVE_BG
 	convert_num_unit((float)part_ptr->total_nodes, tmp_cnt, 
-			 sizeof(tmp_buf), UNIT_NONE);
+			 sizeof(tmp_cnt), UNIT_NONE);
 #else
 	sprintf(tmp_cnt, "%u", part_ptr->total_nodes);
 #endif
diff --git a/testsuite/expect/test1.32 b/testsuite/expect/test1.32
index da2d9bd348e..f833cb4ec90 100755
--- a/testsuite/expect/test1.32
+++ b/testsuite/expect/test1.32
@@ -88,12 +88,12 @@ expect {
 		incr matches
 		exp_continue
 	}
-	-re "SIGUSR1" {
-		set usr1cnt [expr $usr1cnt + 1]
-		exp_continue
-	}
-	-re "SIGUSR2" {
-		set usr2cnt [expr $usr2cnt + 1]
+	-re "SIGUSR($number)" {
+		if {$expect_out(1,string) == 1} {
+			set usr1cnt [expr $usr1cnt + 1]
+		} else {
+			set usr2cnt [expr $usr2cnt + 1]
+		}
 		exp_continue
 	}
 	-re "error.*not running" {
diff --git a/testsuite/expect/test10.5 b/testsuite/expect/test10.5
index e74f25b3210..d48da0b5318 100755
--- a/testsuite/expect/test10.5
+++ b/testsuite/expect/test10.5
@@ -97,7 +97,16 @@ expect {
 		send "q"
 		exp_continue
 	}
-	
+	-re "error" {
+		send_user "\nFAILURE: smap error\n"
+		set exit_code 1
+		exp_continue
+	}
+	-re "fatal" {
+		send_user "\nFAILURE: smap error\n"
+		set exit_code 1
+		exp_continue
+	}
 	timeout {
 		send_user "\nFAILURE: smap not responding\n"
 		set exit_code 1
diff --git a/testsuite/expect/test10.6 b/testsuite/expect/test10.6
index 48388e84a21..038e9331be9 100755
--- a/testsuite/expect/test10.6
+++ b/testsuite/expect/test10.6
@@ -86,7 +86,16 @@ expect {
 		incr matches
 		exp_continue
 	}
-	
+	-re "error" {
+		send_user "\nFAILURE: smap error\n"
+		set exit_code 1
+		exp_continue
+	}
+	-re "fatal" {
+		send_user "\nFAILURE: smap error\n"
+		set exit_code 1
+		exp_continue
+	}
 	timeout {
 		send_user "\nFAILURE: smap not responding\n"
 		set exit_code 1
-- 
GitLab