From 6bad37056662a4b3f2e28d2a88cc49bbab48e986 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Thu, 1 Jun 2006 16:17:01 +0000
Subject: [PATCH] svn merge -r8249:8263
 https://eris.llnl.gov/svn/slurm/branches/slurm-1.1

---
 NEWS                         |  1 +
 doc/html/documentation.shtml |  6 ++++--
 doc/html/help.shtml          |  8 +++++---
 doc/man/man8/slurmctld.8     |  7 +++++--
 doc/man/man8/slurmd.8        |  7 +++++--
 src/common/parse_config.c    | 19 +++++++++++--------
 src/common/read_config.c     |  9 +++++----
 src/slurmctld/controller.c   |  6 +++++-
 src/slurmd/slurmd/slurmd.c   |  6 +++++-
 9 files changed, 46 insertions(+), 23 deletions(-)

diff --git a/NEWS b/NEWS
index a8059896600..1d9a488eb26 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@ documents those changes that are of interest to users and admins.
     to that time.
  -- Fix bug in PMI support that prevented use of second PMI_Barrier call.
     This fix is needed for MVAPICH2 use.
+ -- Add "-V" options to slurmctld and slurmd to print version number and exit.
 
 * Changes in SLURM 1.1.0
 ========================
diff --git a/doc/html/documentation.shtml b/doc/html/documentation.shtml
index b6abbb63e6c..86ca4b157b9 100644
--- a/doc/html/documentation.shtml
+++ b/doc/html/documentation.shtml
@@ -22,6 +22,9 @@
 <li><a href="bluegene.shtml">Blue Gene User and Administrator Guide</a></li>
 <li><a href="ibm.shtml">IBM AIX User and Administrator Guide</a></li>
 <li><a href="configurator.html">Configuration Tool</a></li>
+<li><a href="maui.shtml">Maui Scheduler Integration Guide</a></li>
+<li><a href="http://docs.hp.com/en/7446/xc_user_gd/ch05.html">Submitting 
+Jobs throuh LSF</a></li>
 </ul>
 
 <h2>SLURM Developers</h2>
@@ -36,10 +39,9 @@
 <li><a href="selectplugins.shtml">Node Selection Plugin Programmer Guide</a></li>
 <li><a href="schedplugins.shtml">Scheduler Plugin Programmer Guide</a></li>
 <li><a href="switchplugins.shtml">Switch (Interconnect) Plugin Programmer Guide</a></li>
-<li><a href="maui.shtml">Maui Scheduler Integration Guide</a></li>
 <li><a href="mpiplugins.shtml">MPI Plugin Programmer Guide</a></li>
 </ul>
 
-<p style="text-align:center;">Last modified 11 May 2006</p>
+<p style="text-align:center;">Last modified 31 May 2006</p>
 
 <!--#include virtual="footer.txt"-->
diff --git a/doc/html/help.shtml b/doc/html/help.shtml
index be365590a5e..feaf591f039 100644
--- a/doc/html/help.shtml
+++ b/doc/html/help.shtml
@@ -7,11 +7,13 @@
 <li>For run-time problems, try running the command or daemons in verbose mode 
 (<span class="commandline">-v</span> option), and see if additional information 
 helps you resolve the problem.</li>
-<li>Customers of HP and Linux NetworX should contact their support staff.</li>
-<li>Send a detailed description of the problem and logs to 
+<li>Customers of HP, Linux NetworX and others providing commercial support 
+for SLURM should contact their support staff.</li>
+<li>Send a detailed description of the problem, the output from the command
+"scontrol show config", logs, back traces from any core files, etc. to 
 <a href="mailto:slurm-dev@lists.llnl.gov">slurm-dev@lists.llnl.gov</a>.</li>
 </ol>
 
-<p style="text-align:center;">Last modified 5 April 2006</p>
+<p style="text-align:center;">Last modified 31 May 2006</p>
 
 <!--#include virtual="footer.txt"-->
diff --git a/doc/man/man8/slurmctld.8 b/doc/man/man8/slurmctld.8
index 37db1a61ce0..5955c7d6b3e 100644
--- a/doc/man/man8/slurmctld.8
+++ b/doc/man/man8/slurmctld.8
@@ -1,4 +1,4 @@
-.TH SLURMCTLD "8" "March 2004" "slurmctld 0.5" "Slurm components"
+.TH SLURMCTLD "8" "June 2006" "slurmctld 1.1" "Slurm components"
 .SH "NAME"
 slurmctld \- The central management daemon of Slurm.
 .SH "SYNOPSIS"
@@ -32,6 +32,9 @@ Write log messages to the specified file.
 .TP
 \fB\-v\fR
 Verbose operation. Multiple \fB-\v\fR's increase verbosity.
+.TP
+\fB\-V\fR
+Print version information and exit.
 
 .SH "ENVIRONMENT VARIABLES"
 The following environment variables can be used to override settings
@@ -52,7 +55,7 @@ other parameters used by other Slurm components, change the common
 configuration file, \fBslurm.conf\fR.
 
 .SH "COPYING"
-Copyright (C) 2002 The Regents of the University of California.
+Copyright (C) 2002\-2006 The Regents of the University of California.
 Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 UCRL-CODE-217948.
 .LP
diff --git a/doc/man/man8/slurmd.8 b/doc/man/man8/slurmd.8
index 463c78f5bbd..93df9f17512 100644
--- a/doc/man/man8/slurmd.8
+++ b/doc/man/man8/slurmd.8
@@ -1,4 +1,4 @@
-.TH SLURMD "8" "March 2005" "slurmd 0.5" "Slurm components"
+.TH SLURMD "8" "June 2006" "slurmd 1.1" "Slurm components"
 .SH "NAME"
 slurmd \- The compute node daemon for SLURM.
 .SH "SYNOPSIS"
@@ -35,6 +35,9 @@ Write log messages to the specified file.
 .TP
 \fB-v\fR
 Verbose operation. Multiple -v's increase verbosity.
+.TP
+\fB-V\fR
+Print version information and exit.
 
 .SH "ENVIRONMENT VARIABLES"
 The following environment variables can be used to override settings
@@ -55,7 +58,7 @@ other parameters used by other Slurm components, change the common
 configuration file, \fBslurm.conf\fR.
 
 .SH "COPYING"
-Copyright (C) 2002 The Regents of the University of California.
+Copyright (C) 2002\-2006 The Regents of the University of California.
 Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 UCRL-CODE-217948.
 .LP
diff --git a/src/common/parse_config.c b/src/common/parse_config.c
index e2356b2ec66..3f383878eb4 100644
--- a/src/common/parse_config.c
+++ b/src/common/parse_config.c
@@ -449,17 +449,18 @@ static int _handle_uint16(s_p_values_t *v,
 			    || strcasecmp(value, "INFINITE") == 0) {
 				num = (uint16_t)-1;
 			} else {
-				error("\"%s\" is not a valid number", value);
+				error("%s value \"%s\" is not a valid number", 
+					v->key, value);
 				return -1;
 			}
 		} else if (errno == ERANGE) {
-			error("\"%s\" is out of range", value);
+			error("%s value (%s) is out of range", v->key, value);
 			return -1;
 		} else if (num < 0) {
-			error("\"%s\" is less than zero", value);
+			error("%s value (%s) is less than zero", v->key, value);
 			return -1;
 		} else if (num > 0xffff) {
-			error("\"%s\" is greater than 65535", value);
+			error("%s value (%s) is greater than 65535", v->key, value);
 			return -1;
 		}
 		v->data = xmalloc(sizeof(uint16_t));
@@ -496,17 +497,19 @@ static int _handle_uint32(s_p_values_t *v,
 			    || strcasecmp(value, "INFINITE") == 0) {
 				num = (uint32_t)-1;
 			} else {
-				error("\"%s\" is not a valid number", value);
+				error("%s value (%s) is not a valid number", 
+					v->key, value);
 				return -1;
 			}
 		} else if (errno == ERANGE) {
-			error("\"%s\" is out of range", value);
+			error("%s value (%s) is out of range", v->key, value);
 			return -1;
 		} else if (num < 0) {
-			error("\"%s\" is less than zero", value);
+			error("%s value (%s) is less than zero", v->key, value);
 			return -1;
 		} else if (num > 0xffffffff) {
-			error("\"%s\" is greater than 4294967295", value);
+			error("%s value (%s) is greater than 4294967295", 
+				v->key, value);
 			return -1;
 		}
 		v->data = xmalloc(sizeof(uint32_t));
diff --git a/src/common/read_config.c b/src/common/read_config.c
index ee9d4f8c16c..39f122aa08a 100644
--- a/src/common/read_config.c
+++ b/src/common/read_config.c
@@ -265,16 +265,17 @@ static int parse_slurmd_port(void **dest, slurm_parser_enum_t type,
 	num = strtoul(value, &endptr, 0);
 	if ((num == 0 && errno == EINVAL)
 	    || (*endptr != '\0')) {
-		error("\"%s\" is not a valid number", value);
+		error("%s value (%s) is not a valid number", key, value);
 		return -1;
 	} else if (errno == ERANGE) {
-		error("\"%s\" is out of range", value);
+		error("%s value (%s) is out of range", key, value);
 		return -1;
 	} else if (num < 0) {
-		error("\"%s\" is less than zero", value);
+		error("value %s (%s) is less than zero", key, value);
 		return -1;
 	} else if (num > 0xffffffff) {
-		error("\"%s\" is greater than 4294967295", value);
+		error("%s value (%s) is greater than 4294967295", 
+			key, value);
 		return -1;
 	}
 
diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c
index db28ad1748e..322f46b702a 100644
--- a/src/slurmctld/controller.c
+++ b/src/slurmctld/controller.c
@@ -937,7 +937,7 @@ static void _parse_commandline(int argc, char *argv[])
 	int c = 0;
 
 	opterr = 0;
-	while ((c = getopt(argc, argv, "cdDf:hL:rv")) != -1)
+	while ((c = getopt(argc, argv, "cdDf:hL:rvV")) != -1)
 		switch (c) {
 		case 'c':
 			recover = 0;
@@ -966,6 +966,10 @@ static void _parse_commandline(int argc, char *argv[])
 		case 'v':
 			debug_level++;
 			break;
+		case 'V':
+			printf("%s %s\n", PACKAGE, SLURM_VERSION);
+			exit(0);
+			break;
 		default:
 			_usage(argv[0]);
 			exit(1);
diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c
index 053a6b128d5..a55fdaf54a8 100644
--- a/src/slurmd/slurmd/slurmd.c
+++ b/src/slurmd/slurmd/slurmd.c
@@ -67,7 +67,7 @@
 #include "src/slurmd/common/proctrack.h"
 #include "src/slurmd/common/task_plugin.h"
 
-#define GETOPT_ARGS	"L:Dvhcf:MN:"
+#define GETOPT_ARGS	"L:Dvhcf:MN:V"
 
 #ifndef MAXHOSTNAMELEN
 #  define MAXHOSTNAMELEN	64
@@ -729,6 +729,10 @@ _process_cmdline(int ac, char **av)
 		case 'N':
 			conf->node_name = xstrdup(optarg);
 			break;
+		case 'V':
+			printf("%s %s\n", PACKAGE, SLURM_VERSION);
+			exit(0);
+			break;
 		default:
 			_usage(c);
 			exit(1);
-- 
GitLab