Hi Kenneth, Cc: Robert,

I've been trying to set up a default user environment with modules provided by EasyBuild (EB) and using Lmod. We run CentOS 7.2. The EB discussion is in this thread: https://lists.ugent.be/wws/arc/easybuild/2016-10/msg00052.html


My goal is to automatically provide modules built by EB to every normal user, but not actually loading any modules, since users have different needs.

Following the Lmod documentation in http://lmod.readthedocs.io/en/latest/070_standard_modules.html I've come up with the following shell initialization file /etc/profile.d/z01_EasyBuild.sh which gets called after Lmod has been initialized (by z00_lmod.sh):

if [ -z "$__Init_Default_Modules" ]; then
   export __Init_Default_Modules=1
   export EASYBUILD_MODULES_TOOL=Lmod
   export EASYBUILD_PREFIX=/home/modules
   module use $EASYBUILD_PREFIX/modules/all
else
   module refresh
fi

(obviously, the EASYBUILD_PREFIX is site-dependent). Please note that I refrain from calling the recommended "module --initial_load restore". I believe this is unwarranted, unless the sysadmin actually wants users to always load some specific set of system default modules - which I don't want to do. I also don't load the EasyBuild module, because only module builders need to do that, but not the normal users.

It seems to me that the above script would be a suitable minimum setup for automatic initialization of EB modules.

Question to the experts: Is this approach sound, or do you see any problems?

If it seems OK, could you perhaps consider adding the above example to the mentioned Lmod page as a convenient way to get started (at least when using EB). I don't know if this usage example is appropriate for inclusion in the EB documentation, but as a newcomer to EB I certainly felt the need for a good way to provide EB modules to normal users, and I had to work hard to solve this problem.

In my Wiki page about Lmod and EasyBuild I've documented the above:
https://wiki.fysik.dtu.dk/niflheim/EasyBuild_modules#global-setup-of-modules-for-all-users

Thanks,
Ole

--
Ole Holm Nielsen
PhD, Manager of IT services
Department of Physics, Technical University of Denmark,
Building 307, DK-2800 Kongens Lyngby, Denmark

Reply via email to