Add SRUN_EXPORT_ENV as input to srun.
Overrides any setting for SLURM_EXPORT_ENV, which can make nesting jobs simpler. If SBATCH_EXPORT_ENV=NONE (which will cause SLURM_EXPORT_ENV=NONE to be set in the batch step) is used alongside SRUN_EXPORT_ENV=ALL, this allows for the batch environment to be reset, but then for changes made in the batch script (e.g., loading modules with 'module load') to propagate out as part of the step launch. The same can be accomplished by the user in their scripts by explicitly setting 'srun --export=ALL ...' for every step launch, but this should provide an easier mechanism for sites to make this behavior the default for their users by pushing this pair of environment variables into their users default profiles. Bug 5537.
Please register or sign in to comment