Dear Xavier,
Thanks a lot! This is exactly what we were looking for! We will indeed
enable the switch to restore the default collection in our upcoming
v5.0.1 deployment, and add some information on how to use it in our
documentation.
Cheers,
Sébastien
Le 24/01/2022 à 20:24, Xavier Delaruelle a écrit :
> Dear Sébastien & Natthan,
>
> You may rely on collections for that: with the "module save" command,
> users register their current environment which could be restored in
> another session with "module restore" command. So in collections users
> may set their specific modulepath entries and the module they want to
> load in these modulepaths. More details on collections at [1]
>
> Then you may tune the global initrc file to restore the default
> collection of the user if it exists. So when user logs in, its default
> environment is automatically restored. See configuration step #3 in
> installation guide [2].
>
> if {[is-saved default]} {
> module restore
> }
>
> Cheers,
> Xavier
>
> [1] https://modules.readthedocs.io/en/latest/module.html#collections-1
> [2] https://modules.readthedocs.io/en/latest/INSTALL.html#configuration
>
> Le lun. 24 janv. 2022 à 18:36, <sup...@cc...> a écrit :
>
> Dear Xavier,
>
> Thanks for your explanations! It helps a lot, and we now
> understand better how to use the initrc and rc files. However
> there is still something we need to do which we don't know how to
> achieve following your recommendations.
>
>> 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, ...
>
> We are providing Modules for all of our users. We would like them
> to be able to add their own softwares using their own, customized
> rc files. To do so, we first tried to use the 'module use' command
> inside a rc file, but as you explained above, this is not the
> right way to go.We initially did not understand that, and this is
> what we believed to be an "unexpected behaviour". In fact, we can
> use the 'module use' command inside a rc file, without any
> explicite error, but it will overwrite the initrc configuration
> (so we will lose our default Modules configuration).
>
> So is there a way for usersto add a path to the MODULEPATH
> variable using theirown rc file ?
>
> Thanks & cheers,
>
> Sébastien & Natthan
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
--
Sébastien Gadrat
CMS Collaboration @LHC/CERN - CMS Tier-1 Contact Person
CNRS/IN2P3 Computing Center
Lyon/France
Phone: +33 (0)4 78 93 08 80
|