Re: [Lmod-users] How to add path to MODULEPATH permanently
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
|
From: Robert M. <mc...@ta...> - 2017-08-16 19:32:10
|
This is a good idea. I have taken your suggestion and merged it into Lmod
7.6.7. Lmod will now look for where you installed Lmod (say
/apps/lmod/lmod/init/.modulespath). Or you can configure Lmod to read any
file you like with:
$ ./configure --with-ModulePathInit=/path/to/modulepath_init
If this file exists then if will be read and the MODULEPATH_ROOT method
will not be used.
This file takes comments and wildcards, one directory pattern per line.
Please test out 7.6.7 when you get the chance.
Thanks for the suggestion,
R.
On Wed, Aug 16, 2017 at 12:20 PM, Carl Ponder <cp...@nv...> wrote:
> *On 08/16/2017 07:36 AM, Juan A. Cordero Varela wrote:*
>
> I'm a newbie using Lmod, and find no other way to add another path
> (PERMANENTLY) to MODULEPATH than rudely editing the file
> /usr/share/Modules/init/.modulespath.
> It works with module use PATH but it is not permanent. Does anyone know
> if there's another way?
>
> *On 08/16/2017 08:17 AM, Robert McLay wrote:*
>
> Lmod doesn't use /usr/share/Modules/init/.modulespath. Lmod provides a
> file called profile for bash and zsh and cshrc for tcsh/csh. Those files
> are expected to be copied or symlinked into /etc/profile.d. A site is
> expected to modify that to suit their needs as it says in
>
> http://lmod.readthedocs.io/en/latest/030_installing.html
>
> I suppose that a site could modify those files to source some file (say
> /usr/share/Modules/.modulespath) or any other file to be the method of
> setting the MODULEPATH defined at part of the startup scripts.
>
> Here's what I wrote, I'm still in the process of testing it. You append
> these files onto the scripts
>
> init/cshrc
> init/profile
>
> as opposed to maintaining custom versions of the scripts and having to
> keep them is sync with the distro versions.
> A more seamless approach would be to specify the path to the ModulePaths
> file to the configure script and only use it if the file is present.
> The ModulePaths file can contain wildcard paths, which is important for
> my module arrangement, but there may be a less hack-ier way to implement it.
>
> -- Carl
>
>
> ------------------------------
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential information. Any unauthorized review, use,
> disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message.
> ------------------------------
>
--
Robert McLay, Ph.D.
TACC
Manager, HPC Software Tools
(512) 232-8104
|