Re: [Lmod-users] user hierarchies in lmod
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
|
From: Andy R. T. <and...@gm...> - 2013-07-28 17:44:52
|
Okay I spoke a bit too soon. Below works as long as I unload modules
but more automatic things like purge and swap give me the following
error:
$ module load intel/13.0.2.146 mvapich2/1.9a2
$ module swap intel gcc
Lmod Error: Failed to inherit: mvapich2/1.9a2
$ module purge
Lmod Error: Failed to inherit: mvapich2/1.9a2
But:
$ module unload mvapich2 intel
$ module load gcc mvapich2
works fine. Not sure if the bug is mine, the system modules, or lmod.
-- Andy
On Sun, Jul 28, 2013 at 12:30 PM, Andy Ray Terrel <and...@gm...> wrote:
> Okay the only problem was that you have to inherit before prepending
> the modulepath. Otherwise, it would pick up the system module and not
> mine, so for example the mvapich2 (with my fixed path cause don't like
> capital letters):
>
> local fn = myFileName()
> local MROOT = fn:gsub("/compiler/.*$", "")
> local fullName = "intel/13_0/mvapich2/1_9"
> inherit()
> prepend_path("MODULEPATH", pathJoin(MROOT, "mpi", fullName))
>
> -- Andy
>
>
> On Sat, Jul 27, 2013 at 9:17 PM, Robert McLay <mc...@ta...> wrote:
>>
>> The simple answer is that you have to do the whole job. What I mean is that
>> you have to replace the compiler and mpi modules as well.
>>
>> To use this personal hierarchy, you do:
>>
>> $ module use $PERSONAL_HIERARCHY
>>
>> Where that is the location on the system. If you use what I describe below
>> then its:
>>
>> export PERSONAL_HIERARCHY=/work/xxxx/username/opt/apps/Core
>>
>> I like to explain things in the way that the Lmod website explains the
>> hierarchy. So if you make MROOT be:
>>
>> MROOT=$WORK/opt/apps/
>>
>> and you create the directories:
>>
>> $MROOT/Core, $MROOT/Compiler, $MROOT/MPI
>>
>> then you create:
>>
>> $MROOT/Core/intel13/x.lua
>>
>> Where x.lua matches the name(s) of the current intel name. So if TACC has
>> an intel compiler module named 13.1.3.163. Then yours will be
>>
>> $MROOT/Core/intel13/13.1.3.163.lua
>>
>> In that file is:
>>
>> local fn = myFileName()
>> local MROOT = fn:gsub("/Core/.*$","")
>> local fullName = "intel/13_1"
>> prepend_path("MODULEPATH", pathJoin(MROOT,"Compiler",fullName))
>> inherit()
>>
>>
>> The whole point of this file is to place your hierarchy in tandem the TACC
>> hierarchy. The first 2 lines use myFileName() to figure out what MROOT is
>> based on the module location. Then next two lines add to MODULEPATH. The
>> last line is magic. The inherit() function loads the same named module that
>> is also in MODULEPATH. So it will load the system "intel/13.1.3.163"
>> module.
>>
>>
>> You then do the same thing for impi and mvapich2. The mvapich2 module has
>> the same version as the system one (say 1.9a2) and goes in:
>>
>> $MROOT/Compiler/intel/13_1/mvapich2/1.9a2.lua
>>
>> and in this file is:
>>
>> local fn = myFileName()
>> local MROOT = fn:gsub("/Compiler/.*$","")
>> local full = "intel/13_1/mvapich2/1_9"
>> prepend_path("MODULEPATH",pathJoin(MROOT,full)
>> inherit()
>>
>> You have the same file for impi that matches the system name. Finally your
>> "p4est/dev.lua" goes in
>>
>> $MROOT/MPI/intel/13_1/mvapich2/1_9/p4est/dev.lua
>>
>> and
>>
>> $MROOT/MPI/intel/13_1/impi/xxx/p4est/dev.lua
>>
>> The only thing to remember is that when the system (i.e.) TACC installs a
>> new compiler or mpi stack you'll need to match it. But since the intel
>> compiler and mpi stack modulefiles relatively version independent, all you
>> need to is copy the file to the new name. You do not have to use this
>> particular naming scheme for the hierarchy but I like this one because all
>> the modulefiles are under one directory tree. The way that TACC does it the
>> modulefiles are spread all over.
>>
>> I hope this helps, I guess the answer is a little complicated. Please feel
>> free to ask for more details if I have not been clear.
>>
>> R.
>>
>>
>>
>>
>>
>> On Sat, Jul 27, 2013 at 6:16 PM, Andy Ray Terrel <and...@gm...>
>> wrote:
>>>
>>> Hello Robert,
>>>
>>> I know I've asked this to you before, but I forgot the answer. If I
>>> have a user defined module file that mimics TACC's heirarchy, how do I
>>> make it spawn a reload if I switch the TACC mpi stack.
>>>
>>> So, if I have:
>>>
>>> $WORK/opt/app/intel13/impi/p4est/dev.lua
>>>
>>> and
>>>
>>> $WORK/opt/apps/intel13/mvapich/p4est/dev.lua
>>>
>>> is there a way that
>>>
>>> module swap impi mvapich
>>>
>>> can pick up the reload in p4est?
>>>
>>> -- Andy
>>
>>
>>
>>
>> --
>> Robert McLay, Ph.D.
>> TACC
>> Manager, HPC Software Tools
>> (512) 232-8104
>>
|