I will add a mention of use/unuse in the module section in modulefile man
page.
Commands originated from the modulefile side are mainly documented in
modulefile man page. If they can also be used as module sub-command they
are shortly described in module man page with a reference to the modulefile
documentation counterpart. Also the part specific to the use as a
sub-command is described in the module man page.
Following the same fashion, commands originated from the module side are
mainly documented in module man page. If they can also be used as
modulefile command, they are shortly described in modulefile man page with
a reference to the module documentation counterpart. And the specificities
of the modulefile use are also described in the modulefile man page.
A summary table should also be added, in the same fashion than the
configuration table [1], to give a full view of what can be used from the
command-line, in modulefile or in modulerc.
Regards,
Xavier
[1]
https://modules.readthedocs.io/en/latest/INSTALL.html#configuration-options
Le ven. 8 avr. 2022 à 00:16, Paul Markfort <pau...@gm...> a écrit :
> use and unuse are missing from that list (no list of module sub-commands
> you can use in a module file).
> Also a more tabular format to the list might be helpful.
>
> Actually - you don't need a list of commands that have a modulefile
> counterpart.
> instead - remove those from the module man page (and fully document them
> in the modulefile man page - as you can now use modulefile commands on the
> module command line).
>
>
> Keep the information about the module command in a modulefile to a minimum
> (all the real descriptive info should be in the module man page.
>
>
> module [sub-command] [sub-command-options] [sub-command-args]
> Contains the same sub-commands as described in the module(1) man
> page in the Module Sub-Commands section.
>
> You can use the following sub-commands in a modulefile:
> module unuse
> module use
> .....
>
> The following sub-commands cannot be used in a module file:
> module autoinit
> module clear
> module config
> module edit
> module help
> module path
> module paths
> module refresh
> module sh-to-mod
> module source
>
> The following sub-commands cannot be used but have a modulefile
> command counterpart:
> module append-path
> module info-loaded
> module is-loaded
> module is-saved,
> module is-used
> module is-avail
> module prepend-path
> module remove-path
>
>
> Or perhaps - just make it real short and put all the notes as to which
> module sub-commands can be used in a modulefile, in the module man page.
>
>
>
>
>
> On 2022-04-07 02:00 PM, Xavier Delaruelle wrote:
> > Hi Paul,
> >
> > The section relative to the module command in the modulefile man [1]
> > already gives such kind of information:
> >
> > "Contains the same *sub-commands* as described in the module
> > <https://modules.readthedocs.io/en/latest/module.html#module-1> man
> page in
> > the Module Sub-Commands
> > <
> https://modules.readthedocs.io/en/latest/module.html#module-sub-commands>
> > section. Exception made for the following sub-commands that can only be
> > used outside of a modulefile context: path
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-path>,
> paths
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-paths>,
> > autoinit, help
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-help>,
> clear
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-clear>,
> > sh-to-mod
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-sh-to-mod>,
> > edit <https://modules.readthedocs.io/en/latest/module.html#subcmd-edit>,
> > config <
> https://modules.readthedocs.io/en/latest/module.html#subcmd-config>,
> > refresh
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-refresh>,
> > source <
> https://modules.readthedocs.io/en/latest/module.html#subcmd-source>
> > and state
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-state>.
> Also
> > the following sub-commands cannot be used but have a modulefile command
> > counterpart: prepend-path
> > <
> https://modules.readthedocs.io/en/latest/module.html#subcmd-prepend-path>,
> > append-path
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-append-path
> >,
> > remove-path
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-remove-path
> >,
> > is-loaded
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-is-loaded>,
> > is-saved
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-is-saved>,
> > is-used
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-is-used>,
> > is-avail
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-is-avail>
> and
> > info-loaded
> > <https://modules.readthedocs.io/en/latest/module.html#subcmd-info-loaded
> >."
> >
> > Regards,
> > Xavier
> >
> > [1]
> https://modules.readthedocs.io/en/latest/modulefile.html#mfcmd-module
> >
> > Le jeu. 7 avr. 2022 à 19:40, Paul Markfort <pau...@gm...> a
> écrit :
> >
> >> Xavier,
> >>
> >> I note that use/unuse is not in the modulefile man page (even though it
> >> can be used there according to the module man page).
> >>
> >> now that module file commands can be used from the command line,
> >> you might want to move all the info about those commands to the
> modulefile
> >> man page, and put snippets in the module man page that say something
> like:
> >>
> >> unuse: SEE: modulefile
> >>
> >>
> >> Also, for commands that can only be used on the command line, you might
> >> want to but a snippit in the modulefile man page that says it is only
> valid
> >> on the command line. Like:
> >>
> >> source: This is a tcl command (SEE: tclsh), "module source" is not
> >> allowed in modulefiles (SEE: module).
> >>
> >>
> >> On 2022-04-07 12:28 PM, Paul Markfort wrote:
> >>> If modify "/a/b/c:/d/e/f:/g/h/i" into "/d/e/f:/a/b/c:/g/h/i" would be
> >> acceptable,
> >>> you could remove then prepend "/d/e/f"
> >>>
> >>> I think you could also do this with use
> >>>
> >>> unuse /d/e/f
> >>> use /d/e/f
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On 2022-04-07 12:10 PM, Frank Thommen wrote:
> >>>> Thanks a lot. I finally found this in the documentation, too. I
> hadn't
> >> understood it at first reading but your mail made it clear to me. Maybe
> >> this - imho unexpected - behaviour could/should be emphasized in the
> >> documentation?
> >>>>
> >>>> I don't know about "collections" yet. I'll look that up in the
> >> documentation.
> >>>>
> >>>> In our case, due to certain special circumstances, we need /some/
> users
> >> to prepend the - already configured - path to one of our modulefile
> >> directories to $MODULEPATH (ie. the idea was to modify
> >> "/a/b/c:/d/e/f:/g/h/i" into "/d/e/f:/a/b/c:/d/e/f:/g/h/i". I now
> realize
> >> that this doesn't work anyway, as a path already existing in
> $MODULEPATH is
> >> not added again :-(.
> >>>>
> >>>> I'll have to see if I can find a workaround.
> >>>>
> >>>> For the more general problem that I'm having with the configuration
> >> mechanics of modules I will open a separate thread.
> >>>>
> >>>> Cheers, Frank
> >>>>
> >>>>
> >>>>
> >>>> On 06.04.22 08:21, Xavier Delaruelle wrote:
> >>>>> The etc/modulespath and etc/initrc configuration files are evaluated
> >> during Modules initialization only if MODULEPATH and LOADEDMODULES
> >> environment variables are found unset or empty.
> >>>>>
> >>>>> When a module command is run, the ~/.modulerc file is evaluated. It
> >> happens also for the autoinit command, which is run to initialize
> Modules.
> >>>>>
> >>>>> So in your situation, during the initialization of Modules,
> MODULEPATH
> >> is defined by ~/.modulerc commands, so the etc/modulespath file is not
> >> processed.
> >>>>>
> >>>>> I would recommend not to set MODULEPATH in ~/.modulerc file
> >> (etc/modulespath, etc/initrc or collection files should be preferred to
> >> define the modulepaths). But one way to workaround this issue is to
> update
> >> ~/.modulerc with the following code:
> >>>>>
> >>>>> $ cat ~/.modulerc
> >>>>> #%Module
> >>>>> if {![module-info command autoinit]} {
> >>>>> module use --append /a/b/c
> >>>>> append-path MODULEPATH /d/e/f
> >>>>> }
> >>>>>
> >>>>> Cheers,
> >>>>> Xavier
> >>>>>
> >>>>> Le mar. 5 avr. 2022 à 23:59, Frank Thommen <
> >> f.t...@dk... <mailto:f.t...@dk...>> a
> >> écrit :
> >>>>>
> >>>>> they are defined in etc/modulespath. If I leave ~/.modulerc
> empty,
> >>>>> $MODULEPATH is $CENTRALLY_SET_MODULEPATHS
> >>>>>
> >>>>> On 05.04.22 17:45, Xav...@CE...
> >>>>> <mailto:Xav...@CE...> wrote:
> >>>>> > Hi Frank,
> >>>>> >
> >>>>> > Could you describe where and how the
> $CENTRALLY_SET_MODULEPATHS
> >> are
> >>>>> > defined ?
> >>>>> >
> >>>>> > Cheers,
> >>>>> > Xavier
> >>>>> >
> >>>>> >
> >>>>> > On Tue, 2022-04-05 at 17:28 +0200, Frank Thommen wrote:
> >>>>> >> Hi,
> >>>>> >>
> >>>>> >> this is most probably a silly error on my side, but I
> haven't
> >> found
> >>>>> >> the
> >>>>> >> solution: When having a custom ~/.modulerc with
> >>>>> >>
> >>>>> >> #%Module
> >>>>> >> module use --append /a/b/c
> >>>>> >> append-path MODULEPATH /d/e/f
> >>>>> >>
> >>>>> >> the resulting $MODULEPATH is "/a/b/c:/d/e/f". I would have
> >>>>> >> expected it
> >>>>> >> to be "$CENTRALLY_SET_MODULEPATHS:/a/b/c:/d/e/f". When only
> >> using
> >>>>> >> `append-path` it looks similar:
> >>>>> >>
> >>>>> >> #%Module
> >>>>> >> append-path MODULEPATH /d/e/f
> >>>>> >>
> >>>>> >> results in $MODULEPATH being "/d/e/f" instead of
> >>>>> >> "$CENTRALLY_SET_MODULEPATHS:/d/e/f".
> >>>>> >>
> >>>>> >> This is with Modules 5.0.1 on CentOS 7.9 systems. We have
> not
> >>>>> >> changed
> >>>>> >> any of the other configuration files after the installation
> >> other
> >>>>> >> than
> >>>>> >> populating etc/modulespath with our central modulefile
> >> repository
> >>>>> >> pathes.
> >>>>> >>
> >>>>> >> What have I overlooked?
> >>>>> >>
> >>>>> >> Cheers, Frank
> >>>>> >>
> >>>>> >
> >>>>> > _______________________________________________
> >>>>> > Modules-interest mailing list
> >>>>> > Mod...@li...
> >>>>> <mailto:Mod...@li...>
> >>>>> >
> https://lists.sourceforge.net/lists/listinfo/modules-interest
> >>>>> <https://lists.sourceforge.net/lists/listinfo/modules-interest>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> Modules-interest mailing list
> >>>>> Mod...@li...
> >>>>> <mailto:Mod...@li...>
> >>>>> https://lists.sourceforge.net/lists/listinfo/modules-interest
> >>>>> <https://lists.sourceforge.net/lists/listinfo/modules-interest>
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> 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
> >>>
> >>
> >> --
> >> --------------------------------------------------------
> >> The views and opinions expressed above are strictly
> >> those of the author(s). The content of this message has
> >> not been reviewed nor approved by any entity whatsoever.
> >> --------------------------------------------------------
> >> Paul FM Info: http://paulfm.com/~paulfm/
> >> --------------------------------------------------------
> >>
> >>
> >> _______________________________________________
> >> 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
> >
>
> --
> --------------------------------------------------------
> The views and opinions expressed above are strictly
> those of the author(s). The content of this message has
> not been reviewed nor approved by any entity whatsoever.
> --------------------------------------------------------
> Paul FM Info: http://paulfm.com/~paulfm/
> --------------------------------------------------------
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
|