On 13/10/16 16:11, Ole Holm Nielsen wrote:
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:

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_PREFIX=/home/modules
   module use $EASYBUILD_PREFIX/modules/all
Is this right?

Are the modules really in /home/modules/modules/all?

   module load EasyBuild
   module refresh

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.

Well, you need to define $LMOD_SYSTEM_DEFAULT_MODULES :)

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

Having a proper default setup in place makes sense, but users can easily override it with their own config file or via environment variables.

The only thing we do is load Lmod itself (a symlink to init/bash in

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

They can define a config file, or define environment variables (typically via .bashrc), up to them...


Reply via email to