<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Century Gothic";
        panose-1:2 11 5 2 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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:<o:p></o:p></p><p class=MsoNormal>#SBATCH --export=NONE<o:p></o:p></p><p class=MsoNormal>in every jobscript.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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:<o:p></o:p></p><p class=MsoNormal>#SBATCH --export=NONE<o:p></o:p></p><p class=MsoNormal>module load something<o:p></o:p></p><p class=MsoNormal>srun somecommand<o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What do others do to work with SLURM_EXPORT_ENV, or am I missing something?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>With regards,<o:p></o:p></p><p class=MsoNormal>Daniel.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b><span style='font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:EN-AU'>Dr Daniel Grimwood</span></b><b><span style='font-size:12.0pt;font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:EN-AU'><o:p></o:p></span></b></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:EN-AU'>Senior Supercomputing Specialist<o:p></o:p></span></b></p><p class=MsoNormal><span style='font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'>Pawsey Supercomputing Centre</span></b><b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:EN-AU'><o:p></o:p></span></b></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'>26 Dick Perry Ave<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'>Kensington  WA  6151 <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'>Australia<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:EN-AU'>Tel</span></b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:EN-AU'> </span><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'> +61 8 6436 8680<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:EN-AU'>Email</span></b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'>  <a href="mailto:daniel.grimwood@pawsey.org.au"><span style='color:blue'>daniel.grimwood@pawsey.org.au</span></a><o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#17365D;mso-fareast-language:EN-AU'>Web</span></b><span style='font-size:10.0pt;font-family:"Century Gothic",sans-serif;color:#1F497D;mso-fareast-language:EN-AU'>  <a href="http://www.pawsey.org.au/"><span style='color:blue'>www.pawsey.org.au</span></a><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-AU'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-AU'><img border=0 width=230 height=59 id="Picture_x0020_1" src="cid:image001.png@01D3C113.A5000E20" alt="cid:E1FEC35A-DC36-4D0D-B083-E5D379738952@ivec.org"><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>