I apologize for the delayed reply. I had to dig the replies out of my spam folder, so I did not see them right away. Thank you for fixing this so quickly.
________________________________
From: Xavier Delaruelle <xav...@gm...>
Sent: Monday, June 10, 2024 11:28 PM
To: Environment Modules usage and discussion. <mod...@li...>
Subject: Re: [Modules] Switch between versions
Hello Glenn,
The issue you detect comes from the broken *versions* modulefiles that
are generated since Modules 4.2 when --enable-versioning installation
option is set. Modules 4.2 introduced the module consistency and
automated module handling and since then the use of "module unload"
command in modulefiles means declaring a conflict toward the module to
unload.
Starting Modules 4.7, the --not-req option is available on "module
unload" to avoid this implicit conflict declaration.
I have made an issue and a fix for it:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcea-hpc%2Fmodules%2Fissues%2F531&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375358499%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=0xB7tZSiQwS58jYCYOr1LHlmFcSw8ZB6NgTeYDfOGw4%3D&reserved=0<https://github.com/cea-hpc/modules/issues/531>
Existing versions modulefiles for Modules version above 4.6 should be
updated to add the --not-req option to the module unload commands. The
following shell script should help to fix these modulefiles (replace
/usr/local/Modules/versions by the location where the versions
modulefiles are located on your setup):
for i in /usr/local/Modules/versions/*; do
    version=$(basename "$i")
    version=$i
    major=${version:0:1}
    minor=${version:2:1}
    if [[ "$major" -gt 4 || ("$major" -eq 4 && "$minor" -gt 6) ]]; then
        sed -i "s|module unload|module unload --not-req|" "$i"
    fi
done
Regards,
Xavier
Le jeu. 6 juin 2024 à 16:07, Paul Markfort <pau...@gm...> a écrit :
>
> I should point out, that we don't use the actual version switching system.
> But I do use versioning to make it easier to upgrade (the versioning chooses the version specific installation folder for configure).
>
> Notes: We have the modules installed to a network location (/stage/site/modules/ )
>         common is where the actual module files are:
>         MODULEPATH=/h/paulfm/unix/my.etc/modules:/stage/site/modules/common
>
> I install the new version, then change /stage/site/modules/default to point to the installation folder of the new version.
> I have a way of testing the new version before I do this.
> This makes upgrading the modules system very easy, and I have a way to revert if a problem is found in the newer version
> (I have not had to do this in quite some time).
>
>
> A listing will probably make this clearer ( /stage/site is a network share - 3.1.6 is the last binary version we used):
>
> - $ ls -al /stage/site/modules/
> total 27
> drwxr-xr-x 19 root root       22 Mar 27 15:27 .
> drwxr-xr-x 12 root root       12 Jun 29  2023 ..
> drwxr-xr-x  6 root root        6 Apr  4  2005 3.1.6
> lrwxrwxrwx  1 root root       16 Feb 16  2017 3.2.10 -> 3.2.10.tcl.1.729
> drwxr-xr-x  7 root root        7 Nov 13  2016 3.2.10.tcl.1.147
> drwxr-xr-x  7 root root        7 Feb 16  2017 3.2.10.tcl.1.729
> drwxr-xr-x  6 root root        9 Oct 20  2017 4.0.0
> drwxr-xr-x  7 root root        8 Mar 14  2018 4.1.1
> drwxr-xr-x  7 root root        8 Sep 23  2018 4.1.4
> drwxr-xr-x  9 root root       10 Jul 31  2020 4.5.2
> drwxr-xr-x 10 root root       11 Jul  9  2021 4.7.1
> drwxr-xr-x 10 root root       11 Jul 14  2021 4.8.0
> drwxr-xr-x 10 root root       11 Sep 13  2021 5.0.0
> drwxr-xr-x 10 root root       11 Oct 18  2021 5.0.1
> drwxr-xr-x 10 root root       11 May  9  2022 5.1.0
> drwxr-xr-x 10 root root       11 Nov  9  2022 5.2.0
> drwxr-xr-x 10 root root       11 Jul 10  2023 5.3.1
> drwxr-xr-x 10 root root       11 Mar  8 13:11 5.4.0
> drwxr-sr-x 25 root root       27 Dec 29  2020 common
> lrwxrwxrwx  1 root root        5 Mar 27 15:27 default -> 5.4.0
> lrwxrwxrwx  1 root root        5 Aug 21  2023 default.old -> 5.3.1
> drwxr-xr-x  3 root root       13 Mar  8 13:07 versions
>
>
> And, I should thank the module versioned install for showing me the advantages of this way of doing installs.
> I have been using versioned installs (since before 2005) on all sorts of software that I install by hand or from source.
> This includes things like samba, cups, dhcpd (and now kea-dhcp), bind, and several versions of client software (on Linux and Windows).
>
> Here is an example on my home machine (I install to /usr/added):
> - $ ls -al /usr/added/
> total 32
> drwxr-xr-x  8 root root 4096 Apr 12 19:46 .
> drwxr-xr-x 16 root root 4096 Feb  8 11:07 ..
> lrwxrwxrwx  1 root root   21 Apr 12 19:02 bind -> bind.ver/bind-9.18.25
> drwxr-xr-x  4 root root 4096 Apr 12 19:02 bind.ver
> lrwxrwxrwx  1 root root   19 Sep 22  2023 cups -> cups.ver/cups-2.4.7
> drwxr-xr-x  4 root root 4096 Sep 22  2023 cups.ver
> lrwxrwxrwx  1 root root   22 Apr  7  2023 dhcp -> dhcp.ver/dhcp-4.4.3-P1
> drwxr-xr-x  4 root root 4096 Apr  7  2023 dhcp.ver
> lrwxrwxrwx  1 root root   22 Dec 18 16:36 kea-dhcp -> kea-dhcp.ver/kea-2.4.1
> drwxr-xr-x  4 root root 4096 Dec 18 16:36 kea-dhcp.ver
> lrwxrwxrwx  1 root root   22 Apr 12 19:46 samba -> samba.ver/samba-4.20.0
> drwxr-xr-x  4 root root 4096 Apr 12 19:33 samba.ver
> drwxr-xr-x  8 root root 4096 Mar 12 16:07 SITE
>
>
>
> On 2024-06-06 8:36 AM, Xavier Delaruelle wrote:
> > Thanks Paul for your input.
> >
> > It seems this versioning mechanism does not work anymore with
> > automated module handling feature.
> >
> > I will look at how things could be adapted to make versioning work again.
> >
> > Regards,
> > Xavier
> >
> > Le mer. 5 juin 2024 à 17:34, Paul Markfort <pau...@gm...> a écrit :
> >>
> >> How do you switch module versions?
> >>
> >> So far (starting with 5.4.0 - in bash) I find this sort of works:
> >>
> >> - $ echo $SHELL
> >> /bin/bash
> >>
> >> - $ module --version
> >> Modules Release 5.4.0 (2024-02-20)
> >>
> >> - $ module load /stage/site/modules/5.3.1/modulefiles/modules
> >>
> >> - $ . /stage/site/modules/5.3.1/init/bash
> >>
> >>
> >> But that misses a couple variables:
> >> - $ set |grep MODULE
> >> MODULESHOME=/stage/site/modules/5.3.1
> >> MODULES_CMD=/stage/site/modules/5.3.1/libexec/modulecmd.tcl
> >> MODULE_VERSION=5.4.0
> >> MODULE_VERSION_STACK=5.4.0
> >>
> >> But this then works:
> >> - $ module --version
> >> Modules Release 5.3.1 (2023-06-27)
> >>
> >>
> >> The files in /stage/site/modules/versions have a dependency for the modules module
> >> Which means one needs a generic version of this module (the one shipped with each version is module specific)
> >>
> >> This doesn't work at all:
> >>
> >> - $ module switch /stage/site/modules/versions/5.4.0/version  /stage/site/modules/versions/5.3.1
> >> Loading /stage/site/modules/versions/5.3.1
> >>     ERROR: Unable to locate a modulefile for 'modules'
> >>     ERROR: Load of requirement modules failed
> >>
> >> Switching from /stage/site/modules/versions/5.4.0/version to /stage/site/modules/versions/5.3.1
> >>     ERROR: Load of switched-on /stage/site/modules/versions/5.3.1 failed
> >>
> >> Even this fails:
> >>
> >> - $ module switch /stage/site/modules/versions/5.4.0/version
> >> Loading /stage/site/modules/versions/5.4.0/version
> >>     ERROR: Unable to locate a modulefile for 'modules'
> >>     ERROR: Load of requirement modules failed
> >>
> >> Switching from /stage/site/modules/versions/5.4.0/version to /stage/site/modules/versions/5.4.0/version
> >>     ERROR: Load of switched-on /stage/site/modules/versions/5.4.0/version failed
> >>
> >>
> >> If I add a no-op module named modules to my set, then I get:
> >>
> >> - $  module switch /stage/site/modules/versions/5.4.0/version /stage/site/modules/versions/5.3.1
> >> Loading modules
> >>     ERROR: Conflicting /stage/site/modules/versions/5.3.1 is loading
> >>
> >> Loading /stage/site/modules/versions/5.3.1
> >>     ERROR: Load of requirement modules failed
> >>
> >> Switching from /stage/site/modules/versions/5.4.0/version to /stage/site/modules/versions/5.3.1
> >>     ERROR: Load of switched-on /stage/site/modules/versions/5.3.1 failed
> >>
> >>
> >>
> >> On 2024-06-05 5:44 PM, Xavier Delaruelle wrote:
> >>> Hello Glenn,
> >>>
> >>> Could you give the command you type and the complete output obtained.
> >>> It will help to understand the issue you face. Are you using the
> >>> "module switch" command to change version?
> >>>
> >>> Regards,
> >>> Xavier
> >>>
> >>> Le mer. 5 juin 2024 à 15:12, Glenn Johnson <gle...@ou...> a écrit :
> >>>>
> >>>> I have set --enable-versioning for multiple installations of environment-modules. I cannot figure out how to switch between the versions though. I get
> >>>>
> >>>> conflicting <version> is loading
> >>>>
> >>>> messages and load of requirement modules failed.
> >>>> _______________________________________________
> >>>> Modules-interest mailing list
> >>>> Mod...@li...
> >>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fmodules-interest&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375372334%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=SAEsa59Z2CbeEdcbdY6NabqCi8X6DqVoUGzyuclCZTM%3D&reserved=0<https://lists.sourceforge.net/lists/listinfo/modules-interest>
> >>>
> >>>
> >>> _______________________________________________
> >>> Modules-interest mailing list
> >>> Mod...@li...
> >>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fmodules-interest&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375382381%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=R9mEqdgbunbgq%2FULBlbXPKtawtLih%2BNGVqHPqyGbIL8%3D&reserved=0<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: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpaulfm.com%2F~paulfm%2F&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375389961%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=bERFCXCx1%2BZu9TwGifwvONtRU%2FGrpmx6HsyjjtYZQwI%3D&reserved=0<http://paulfm.com/~paulfm/>
> >> --------------------------------------------------------
> >>
> >>
> >> _______________________________________________
> >> Modules-interest mailing list
> >> Mod...@li...
> >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fmodules-interest&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375395525%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Dj24n0lGQVkqde8FqiGz%2Fif98gTiec9AMpckGC76mY8%3D&reserved=0<https://lists.sourceforge.net/lists/listinfo/modules-interest>
> >
> >
> > _______________________________________________
> > Modules-interest mailing list
> > Mod...@li...
> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fmodules-interest&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375400270%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=s3GUmA6rDGvnnCVzG6TKAntMEx8r52vaMO%2BFopdJ1nk%3D&reserved=0<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: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpaulfm.com%2F~paulfm%2F&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375404888%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=M%2B4aS4eHWfNO8LspO1V27aWA0ux1%2FN9LQ5yRxXwwPSM%3D&reserved=0<http://paulfm.com/~paulfm/>
> --------------------------------------------------------
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fmodules-interest&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375409402%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=sOzbrOMPeE8r0HzphlFbhJdH3P9iG0ZGJSRs6mz3U9M%3D&reserved=0<https://lists.sourceforge.net/lists/listinfo/modules-interest>
_______________________________________________
Modules-interest mailing list
Mod...@li...
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fmodules-interest&data=05%7C02%7C%7C7f5501b9553f4d17ad7908dc89cf0152%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638536769375413809%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=KHuVrCf%2Bh4lvzCbrtAVDZ1ol9W%2BaQWy4OHWEFIT0%2BzA%3D&reserved=0<https://lists.sourceforge.net/lists/listinfo/modules-interest>
 |