From 62f3dd758173bdca896360e2677798d1f4f870b6 Mon Sep 17 00:00:00 2001 From: Jose Gracia Date: Fri, 19 Jul 2024 07:30:56 -0500 Subject: [PATCH] scorep: Assert cce is cray compiler --- .../repos/builtin/packages/scorep/package.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py index a040dc3a3d..e7f51cc811 100644 --- a/var/spack/repos/builtin/packages/scorep/package.py +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -153,6 +153,14 @@ def find_libpath(self, libname, root): return None return libs.directories[0] + # handle any mapping of Spack compiler names to Score-P args + # this should continue to exist for backward compatibility + def clean_compiler(self, compiler): + renames = {"cce": "cray"} + if compiler in renames: + return renames[compiler] + return compiler + def configure_args(self): spec = self.spec @@ -162,9 +170,9 @@ def configure_args(self): "--enable-shared", ] - cname = spec.compiler.name - if not spec.satisfies("platform=cray"): - config_args.append("--with-nocross-compiler-suite={0}".format(cname)) + cname = self.clean_compiler(spec.compiler.name) + + config_args.append("--with-nocross-compiler-suite={0}".format(cname)) if self.version >= Version("4.0"): config_args.append("--with-cubew=%s" % spec["cubew"].prefix.bin) @@ -189,8 +197,7 @@ def configure_args(self): config_args.append("--with-rocm=%s" % spec["hip"].prefix) config_args += self.with_or_without("shmem") - if not spec.satisfies("platform=cray"): - config_args += self.with_or_without("mpi") + config_args += self.with_or_without("mpi") if spec.satisfies("^intel-mpi"): config_args.append("--with-mpi=intel3")