OK, that why my idea would (mostly) work here and not work in general.
Here, folks do not have their RC files modules-aware, so I have to find
another solution.
I may just tell folks:
- Use our easy hack and you have no control, or
- install modules-aware shell RC files and use the full power of modules
Thanks...
H (who wonders why his test at linking the two files did not loop forever...)
--
> > > > So I had a dream.
> > > >
> > > > Would it be a Bad Idea to:
> > > >
> > > > ln ~/.modules ~/.modulesrc
> > > >
> > > > H
> > >
> > > Well, one is supposed to be processed by tcl, the other is supposed to
> > > be processed by all shells. Does your shell grok tcl ;-) ?
> >
> > No, but modules does not process the .modules file on a per-shell startup
> > basis, and the .modulesrc file is not recognized by the "module init*"
> > commands.
> >
> > Who is expected to process the ~/.modules file?
>
> The design of modules as I understand it is such that you "bootstrap"
> them into a shell by:
>
> 1. defining module alias (for every shell, because aliases cannot be
> inherited);
>
> 2. defining some module-specific variables (MODULESHOME, MODULEPATH,
> MODULE_VERSION, MODULE_VERSION_STACK). That can be done in login
> shell only and inherited;
>
> 3. sourcing ~/.modules file for your initial shell-neutral setup. That
> can be done in login shell only (if you're only setting up
> environment variables).
>
> Now, ~/.modulesrc is used every time you invoke modulecmd, so putting
> "module load" in there has a potential risk sending modulecmd into a
> loop, doesn't it?
>
> Gintas
|