summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-01-11 19:09:02 +0100
committerGitHub <noreply@github.com>2023-01-11 10:09:02 -0800
commitccb9969b64c258d1504ffaa11d3910a999d8e4d5 (patch)
tree525ce8a39c735bdfed785cb91b9c13ab6aa22718 /lib
parentfa93b5219c4d2bdf494f65d0b0ed8cbe07e55d2f (diff)
downloadspack-ccb9969b64c258d1504ffaa11d3910a999d8e4d5.tar.gz
spack-ccb9969b64c258d1504ffaa11d3910a999d8e4d5.tar.bz2
spack-ccb9969b64c258d1504ffaa11d3910a999d8e4d5.tar.xz
spack-ccb9969b64c258d1504ffaa11d3910a999d8e4d5.zip
Fix issue when generating compiler hierarchy (#34873)
- [x] Fix bug affecting generation of Lmod modules
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/modules/lmod.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/modules/lmod.py b/lib/spack/spack/modules/lmod.py
index 38d89f085e..2878054ec2 100644
--- a/lib/spack/spack/modules/lmod.py
+++ b/lib/spack/spack/modules/lmod.py
@@ -180,7 +180,7 @@ class LmodConfiguration(BaseConfiguration):
# If it is in the list of supported compilers family -> compiler
if self.spec.name in spack.compilers.supported_compilers():
- provides["compiler"] = spack.spec.CompilerSpec(str(self.spec))
+ provides["compiler"] = spack.spec.CompilerSpec(self.spec.format("{name}{@version}"))
elif self.spec.name in spack.compilers.package_name_to_compiler_name:
# If it is the package for a supported compiler, but of a different name
cname = spack.compilers.package_name_to_compiler_name[self.spec.name]