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://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://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
|