From dfaa33ee21a59e4978886c6cc5127660f80dbbfc Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Tue, 29 Sep 2015 13:22:44 -0700
Subject: [PATCH] srun: Add SLURM_JOB_NODELIST env var

This makes srun more consistent with salloc and sbatch
---
 src/common/env.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/common/env.c b/src/common/env.c
index 744f25ddb2b..4dd9c661730 100644
--- a/src/common/env.c
+++ b/src/common/env.c
@@ -1319,6 +1319,8 @@ env_array_for_step(char ***dest,
 	env_array_overwrite_fmt(dest, "SLURM_STEP_ID", "%u", step->job_step_id);
 	env_array_overwrite_fmt(dest, "SLURM_STEP_NODELIST",
 				"%s", step->step_layout->node_list);
+	env_array_append_fmt(dest, "SLURM_JOB_NODELIST",
+			     "%s", step->step_layout->node_list);
 	if (cluster_flags & CLUSTER_FLAG_BG) {
 		char geo_char[HIGHEST_DIMENSIONS+1];
 
-- 
GitLab