diff --git a/repos/spack_repo/builtin/packages/scalasca/package.py b/repos/spack_repo/builtin/packages/scalasca/package.py index 9d869827009..1f815b925fe 100644 --- a/repos/spack_repo/builtin/packages/scalasca/package.py +++ b/repos/spack_repo/builtin/packages/scalasca/package.py @@ -70,9 +70,23 @@ def configure_args(self): config_args.append("--with-otf2=%s" % spec["otf2"].prefix.bin) - if self.spec["mpi"].name == "openmpi": - config_args.append("--with-mpi=openmpi") - elif self.spec.satisfies("^mpich@3:"): + # Copied from scorep package recipe; full list of options is: + # --with-mpi=(bullxmpi|hp|ibmpoe|intel|intel2|intel3|intelpoe|lam| + # mpibull2|mpich|mpich2|mpich3|openmpi|openmpi3| + # platform|scali|sgimpt|sgimptwrapper|spectrum|sun) + if spec.satisfies("^[virtuals=mpi] intel-oneapi-mpi"): + config_args.append("--with-mpi=intel3") + elif ( + spec.satisfies("^[virtuals=mpi] mpich") + or spec.satisfies("^[virtuals=mpi] mvapich2") + or spec.satisfies("^[virtuals=mpi] cray-mpich") + ): config_args.append("--with-mpi=mpich3") + elif spec.satisfies("^[virtuals=mpi] openmpi") or spec.satisfies( + "^[virtuals=mpi] hpcx-mpi" + ): + config_args.append("--with-mpi=openmpi") + elif spec.satisfies("~mpi"): + config_args.append("--without-mpi") return config_args diff --git a/repos/spack_repo/builtin/packages/scorep/package.py b/repos/spack_repo/builtin/packages/scorep/package.py index 818c696d18d..ad2dd43c3bf 100644 --- a/repos/spack_repo/builtin/packages/scorep/package.py +++ b/repos/spack_repo/builtin/packages/scorep/package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage +from spack.aliases import BUILTIN_TO_LEGACY_COMPILER from spack.package import * @@ -194,7 +195,13 @@ def find_libpath(self, libname, root): # 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", "rocmcc": "amdclang"} + renames = { + "cce": "cray", + "intel-oneapi-compilers": "oneapi", + "intel-oneapi-compilers-classic": "intel", + "llvm": "clang", + "llvm-amdgpu": "amdclang", + } if compiler in renames: return renames[compiler] return compiler @@ -207,6 +214,8 @@ def configure_args(self): "--enable-shared", ] + # cname must match one of these: + # --with-nocross-compiler-suite=(gcc|ibm|intel|oneapi|nvhpc|pgi|clang|aocc|amdclang|cray) cname = self.clean_compiler(spec.compiler.name) config_args.extend(["--with-nocross-compiler-suite={0}".format(cname)])