From d02ca09d8067cfa059f6fdba7c5c35dd67c1b3f2 Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Tue, 17 May 2016 14:48:05 -0700
Subject: [PATCH] Update man pages for SLURMD_NODENAME env var

Correct description of the SLURMD_NODENAME environment variable
in the sbatch and srun man pages.
---
 doc/man/man1/sbatch.1 | 6 +++---
 doc/man/man1/srun.1   | 6 +++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1
index a6c2e19d882..3f455c7000d 100644
--- a/doc/man/man1/sbatch.1
+++ b/doc/man/man1/sbatch.1
@@ -1833,9 +1833,6 @@ SLURM_NODE_ALIASES=ec0:1.2.3.4:foo,ec1:1.2.3.5:bar
 \fBSLURM_NODEID\fR
 ID of the nodes allocated.
 .TP
-\fBSLURMD_NODENAME\fR
-Names of all the allocated nodes.
-.TP
 \fBSLURM_NTASKS\fR (and \fBSLURM_NPROCS\fR for backwards compatibility)
 Same as \fB\-n, \-\-ntasks\fR
 .TP
@@ -1897,6 +1894,9 @@ configured. The value will be set  component  types  listed   in
 SLURM_TOPOLOGY_ADDR.   Each  component will be identified as
 either "switch" or "node".  A period is  used  to separate each
 hardware component type.
+.TP
+\fBSLURMD_NODENAME\fR
+Name of the node running the job script.
 
 .SH "EXAMPLES"
 .LP
diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1
index fdab593d792..0b6a82f449e 100644
--- a/doc/man/man1/srun.1
+++ b/doc/man/man1/srun.1
@@ -2566,7 +2566,11 @@ This is set only if the system has the topology/tree plugin configured.
 The value will be set component types listed in \fBSLURM_TOPOLOGY_ADDR\fR.
 Each component will be identified as either "switch" or "node".
 A period is used to separate each hardware component type.
-
+.TP
+\fBSLURMD_NODENAME\fR
+Name of the node running the task. In the case of a parallel job executing on
+multiple compute nodes, the various tasks will have this environment variable
+set to different values on each compute node.
 .TP
 \fBSRUN_DEBUG\fR
 Set to the logging level of the \fBsrun\fR command.
-- 
GitLab