On 10/13/2016 03:28 PM, Ward Poelmans wrote:
For loading Easybuild by default, I would use a Lmod default collection.


Could you possibly offer a specific example of what you mean?  Like a
complete script to put into /etc/profile.d/ ?

I'm afraid I don't have one. We don't load Easybuild by default for our
users. But you should take a look at:
https://lmod.readthedocs.io/en/latest/070_standard_modules.html

Thanks, this page is actually useful and specific! So I've created a new file /etc/profile.d/z01_EasyBuild.sh (to be loaded *after* Lmod's z00_* scripts) with this content:

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

This seems to do what I want: Initialize EB with the specific usage of Lmod and our EASYBUILD_PREFIX. N.B.: This is on CentOS 7.2.

The recommended line "module --initial_load restore" generates an unwarranted message:

The system default contains no modules
  (env var: LMOD_SYSTEM_DEFAULT_MODULES is empty)
  No changes in loaded modules

so I got rid of it by commenting this line out.

Question: Does anyone see potential problems or bad side effects with such a global setup of EB for all users?

The only thing we do is load Lmod itself (a symlink to init/bash in
/etc/profile.d).

Question: How do your users initialize the usage of EB?

/Ole

Reply via email to