Skip to content
20 changes: 17 additions & 3 deletions repos/spack_repo/builtin/packages/scalasca/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 10 additions & 1 deletion repos/spack_repo/builtin/packages/scorep/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *

Expand Down Expand Up @@ -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
Expand All @@ -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)])

Expand Down