Closed xdelaruelle closed 3 months ago
Issue comes from the use of module unload
command within the generated versions modulefiles. Since v4.2, use of module unload
indicates a conflict toward module targeted for unload.
Adding the --not-req
option to these module unload
commands helps to not define a conflict toward these modules to unload. The --not-req
option has been introduced on Modules 4.7.
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
Fixed by 58476f8
Modulefiles generated when
--enable-versioning
installation option is set do not allow to switch between the different installed version of Modules: