On our slurm clusters the module system (Lmod) works without extra init in job scripts due to the environment-forwarding in slurm. "module" in the submitting context (in bash) on the login node is an "exported" function and as such makes it across.
/Peter On Fri, 22 Jan 2021 10:41:06 +0000 Gestió Servidors <sysadmin.c...@uab.cat> wrote: > Hello, > > I use "Environment Modules" (http://modules.sourceforge.net/) in my > SLURM cluster. In my scripts I do need to add an explicit > "source /soft/modules-3.2.10/Modules/3.2.10/init/bash". However, in > several examples I have read about SLURM scripts, nobody comments > that. So, have I forgotten a parameter in SLURM to "capture" > environment variables into the script or is it a problem due to my > distribution (CentOS-7)??? > > Thanks.