From ccb9969b64c258d1504ffaa11d3910a999d8e4d5 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 11 Jan 2023 19:09:02 +0100 Subject: Fix issue when generating compiler hierarchy (#34873) - [x] Fix bug affecting generation of Lmod modules --- lib/spack/spack/modules/lmod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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] -- cgit v1.2.3-60-g2f50