Le jeu. 20 janv. 2022 à 21:18, <sup...@cc...> a écrit :
> Dear Paul,
>
> Thank you for your quick reply. Please see our answers below.
>
>
> Le 19/01/2022 à 19:06, Paul Markfort a écrit :
> > What you want is unclear.
> > Do you want the user's rc file to be read instead of the global one?
>
> No, we want the user's rc file configuration to be added to the default
> one.
>
>
> > In such a case, the user could just set the: MODULERCFILE variable (to
> > an empty path like /nonexistant/).
> >
> >
> > Below is an explanation of what should be the current behavior
> > (note - in all cases the rc files must be valid module files - that
> > is, begin with the module magic cookie line):
> >
> > And "man module" from 4.7.1 (again - your paths are probably different):
> > Upon invocation of modulecmd.tcl module run-command files are
> > sourced
> > in the following order:
> >
> > 1. Global RC file as specified by MODULERCFILE
> > variable or
> > /stage/site/modules/4.7.1/etc/rc. If MODULERCFILE
> > points to a
> > directory, the modulerc file in this directory is used as
> > global RC
> > file.
> >
> > 2. User specific module RC file $HOME/.modulerc
>
> We observe that the user's '$HOME/.modulerc' (if not empty) completely
> replaces the initial '$MODULERCFILE' file configuration. We would rather
> want the configuration from this file to be added to the default
> configuration.
>
> I hope this makes things clearer.
>
> Best regards,
>
> Natthan
>
> >
> > 3. All .modulerc and .version files found during modulefile
> > seeking.
> >
> >
> >
> >
> > On 2022-01-19 10:35 AM, sup...@cc... wrote:
> >> Dear Modules guys,
> >>
> >> We have installed Modules 4.7.1 on our compute cluster, and we
> >> provide it to our users.
> >>
> >> We have set up a specific configuration using a system 'initrc' (i.e.
> >> the '/etc/environment-modules/initrc').
> >>
> >> We have found out that this initrc configuration can be fully
> >> overwritten by a user '$HOME/.modulerc' if it exists. We would rather
> >> want the user's configuration (i.e. '.modulerc') to be added to the
> >> default existing configuration, i.e. from the 'initrc' file.
> >>
> >> How to ensure that the user's configuration overloads the default one?
> >>
> >> Thank you in advance,
> >>
> >> Best regards,
> >>
> >> Sébastien
>
Dear Sebastien, Natthan and CC team
Thanks for your messages. Could you provide more details on the observation
you made with a small example for instance.
There is 2 separate kind of configuration:
* the 'initrc' file, which is the configuration for the module command and
user environment run once when module is initialized
* the rc files that contribute to the definition and properties of the
available modulefiles and are evaluated each time a module command is
executed
Different kind of commands are found in each kind of files:
* initrc: module config, module use, module load, module restore, ...
* rc: module-alias, module-version, module-hide, module-tag, module-forbid,
...
>From what I can test, the rc files are correctly cascaded:
$ cat /etc/environment-modules/rc
#%Module
module-alias alfoo dot
$ cat $HOME/.modulerc
#%Module
module-alias albar dot
$ module avail -t al
global/user modulerc:
albar
alfoo
So a small example would help us to better understand what you want to
achieve and spot the issue.
Best regards,
Xavier
|