[slurm-users] working with SLURM_EXPORT_ENV

Daniel Grimwood daniel.grimwood at pawsey.org.au
Tue Mar 20 23:05:59 MDT 2018



Due to some users submitting jobs across clusters, and because a clean
environment is easier to reproduce and debug, we ask all our users to add:

#SBATCH --export=NONE

in every jobscript.


The downside to this is that sbatch sets SLURM_EXPORT_ENV, which srun uses
and then exports no non-SLURM environment variables.  So this usually does
not work:

#SBATCH --export=NONE

module load something

srun somecommand

Instead we need to do "srun --export=ALL" to override the SLURM_EXPORT_ENV.
Alternatively could unset SLURM_EXPORT_ENV before srun, but that's ugly.


We've been toying with the idea of asking for something like a
SLURM_SRUN_EXPORT_ENV and SLURM_SBATCH_EXPORT_ENV that would take precedence
(if set) over SLURM_EXPORT_ENV.  Then we could set both of those in the
slurm modulefile to ALL and NONE respectively, while not breaking any other
or default behaviour.


What do others do to work with SLURM_EXPORT_ENV, or am I missing something?


With regards,




Dr Daniel Grimwood

Senior Supercomputing Specialist


Pawsey Supercomputing Centre

26 Dick Perry Ave

Kensington  WA  6151 



Tel  +61 8 6436 8680

Email   <mailto:daniel.grimwood at pawsey.org.au> daniel.grimwood at pawsey.org.au

Web   <http://www.pawsey.org.au/> www.pawsey.org.au



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180321/be953ac5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 57128 bytes
Desc: not available
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180321/be953ac5/attachment-0001.png>

More information about the slurm-users mailing list