Shawn,
We observed the same behavior with our upgrade. I believe --export was
not an option for srun prior to 14.11.0-pre4. From the NEWS file
included with SLURM:
=========
-- Added srun --export option to set/export specific environment
variables.
=========
According to the man page, the default is to pass all environment
variables. However, many of our user scripts contain:
#SBATCH --export=NONE
Which now effectively passes on to srun:
srun --export=NONE
srun previously didn't support --export and so it would not have been
set explicitly. If your scripts set up an environment for srun this has
the effect of breaking that environment.
You can avoid this behavior by adding '--export=ALL' as an argument to
srun or by exporting specific variables to it as needed.
Best,
Jesse Stroik
University of Wisconsin
On 10/23/2014 2:36 PM, L. Shawn Matott wrote:
Hello,
With version 14.11.0-0pre5 we are noticing a change in behavior in how
srun within an sbatch command behaves in conjunction with the "--export"
option. It looks like the path variable is not available to srun in the
pre5 version whereas it is in version 2.6.3 as well as 14.03.3, which
was the last of the 14.x series that we tested against. Is this an
intentional change in behavior?
I've copied a simple example sbatch command below that illustrates the
behavior we are seeing.
Thanks,
----
L. Shawn Matott, PhD
Computational Scientist
University at Buffalo,
Center for Computational Research
701 Ellicott Street, Buffalo, New York 14203
===============================================================
$ sbatch --version
slurm 14.11.0-0pre5
$ sbatch -N1 --wrap='srun hostname'
Submitted batch job 4728
$ cat slurm-4728.out
cpn-k16-39-02.ccr.buffalo.edu
$ sbatch -N1 --export=NONE --wrap='srun hostname'
Submitted batch job 4729
**** $ cat slurm-4729.out
**** srun: error: cpn-k16-39-02: task 0: Exited with exit code 2
**** slurmstepd: execve(): hostname: No such file or directory
============================================================
$ sbatch --version
slurm 14.03.3
$ sbatch -N1 --export=NONE --wrap='srun hostname'
Submitted batch job 4477
$ cat slurm-4477.out
k08n41s01
============================================================
$ sbatch --version
slurm 2.6.3
$ sbatch -N1 --export=NONE --wrap='srun hostname'
Submitted batch job 2935806
$ cat slurm-2935806.out
d07n09s02
============================================================