Hi Bart,
On 15/09/15 17:19, Bart Oldeman wrote:
Hi,
I am trying to set up a hierarchical module structure with Easybuild
2.3.0 and Lmod 6.0.9.
I do however observe that
module load foss/2015b
followed by
module unload foss/2015b
only unloads the foss module but the dependencies are still there.
The default setting is indeed to generate modules that don't unload
'recursively', but this choice is merely historic.
With the --recursive-module-unload configure option (which is disabled
by default), you can make EB spit out modules that behave as you expect.
So, just add 'recursive-module-unload = 1' in your EasyBuild
configuration file (don't confuse this with an easyconfig/.eb file), or
define the environment variable $EASYBUILD_RECURSIVE_MODULE_UNLOAD to
'1' (or whatever).
Using --module-only, you can regenerate modules without redoing the
software builds/installs themselves (see
http://easybuild.readthedocs.org/en/latest/Partial_installations.html#module-only).
regards,
Kenneth
I
locally built an iomkl/2015b toolchain and doing
module load foss/2015b
module load OpenFOAM/2.3.1
module switch foss/2015b iomkl/2015b
does not do the intended thing either (reloading OpenFOAM using the
iomkl toolchain)
Having a look at the foss/2015b.lua file I see:
if not isloaded("GCC/4.9.3-binutils-2.25") then
load("GCC/4.9.3-binutils-2.25")
end
if not isloaded("binutils/2.25") then
load("binutils/2.25")
end
if not isloaded("OpenMPI/1.8.8") then
load("OpenMPI/1.8.8")
end
(etc.)
Now if I simply remove all "not isloaded"s and change that to:
load("GCC/4.9.3-binutils-2.25")
load("binutils/2.25")
load("OpenMPI/1.8.8")
then I a) do not get double loads and b) "module unload foss" will
unload all the depending modules.
To also get "module spider OpenFOAM/2.3.1" listing foss/2015b as a
possibility I need to embed the MODULEPATH changes directly into
foss/2015b.lua (without removing them from the dependent modules of
course):
prepend_path("MODULEPATH",
"/software/CentOS-6/eb/modules/all/Compiler/GCC/4.9.3")
load("GCC/4.9.3-binutils-2.25")
load("binutils/2.25")
prepend_path("MODULEPATH",
"/software/CentOS-6/eb/modules/all/MPI/GCC/4.9.3/OpenMPI/1.8.8")
load("OpenMPI/1.8.8")
load("OpenBLAS/0.2.14-LAPACK-3.5.0")
load("FFTW/3.3.4")
load("ScaLAPACK/2.0.2-OpenBLAS-0.2.14-LAPACK-3.5.0")
Then I can do:
$ module spider OpenFOAM/2.3.1
This module can only be loaded through the following modules:
GCC/4.9.3-binutils-2.25 OpenMPI/1.8.8
foss/2015b
foss/2015b OpenMPI/1.8.8
icc/2015.3.187-GNU-4.9.3-2.25 OpenMPI/1.8.8
ifort/2015.3.187-GNU-4.9.3-2.25 OpenMPI/1.8.8
iomkl/2015b
iomkl/2015b OpenMPI/1.8.8
Before shooting myself in the foot, is there any side effect to doing
this, in particular replacing
if not isloaded("GCC/4.9.3-binutils-2.25") then
load("GCC/4.9.3-binutils-2.25")
end
with a plain
load("GCC/4.9.3-binutils-2.25")
?
Regards,
Bart