On 10/14/2016 10:08 AM, Kenneth Hoste wrote:
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_PREFIX=/home/modules
   module use $EASYBUILD_PREFIX/modules/all
   module refresh

(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

Defining $EASYBUILD_PREFIX by default is probably not something you want
to do for everyone, since that instructs EasyBuild to install software
in this location, and I expect that most users won't have write
permissions there?

That's a good point! Can you enlighten me on how to provide globally available modules as I've done, while at the same time allowing normal users to build their own private modules in their $HOME?

I guess that end users could define in their .bashrc, for example,
  export EASYBUILD_PREFIX=$HOME/modules
When they do
  module use $EASYBUILD_PREFIX/modules/all
that should simply prepend their personal module path to the system-wide one I define above - or maybe I'm totally mistaken here? I did a short test of this as a normal user, and it seems to work as expected.

I'm happy to include this in the EasyBuild documentation somewhere, any
suggestions for a particular location? Should it be a new page?
Are you up for making a pull request to the EasyBuild documentation for
this (see the 'docs' subdir in https://github.com/hpcugent/easybuild)?

I'd be happy to start working with Github, but it'll take some time for me to familiarize myself with this ecosystem. But I don't see a natural place in the current EB documentation to make contributions.

Perhaps you could consider the possibility of making a new section in https://easybuild.readthedocs.io/en/latest/, for example, "EasyBuild for End Users" or similar. I'm thinking that end users should know how to use EB modules, and sysadmins should think of ways to provide modules to end users.

If you provide a section according to your wishes, perhaps you could include my above script as an example?


Ole Holm Nielsen
PhD, Manager of IT services
Department of Physics, Technical University of Denmark,
Building 307, DK-2800 Kongens Lyngby, Denmark
E-mail: ole.h.niel...@fysik.dtu.dk
Homepage: http://dcwww.fysik.dtu.dk/~ohnielse/
Tel: (+45) 4525 3187 / Mobile (+45) 5180 1620

Reply via email to