From b7f78157b2dea26cde7b7e63660b032452bc3104 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 28 Jan 2026 13:58:03 -0700 Subject: [PATCH 1/4] Bug fixes for scalasca and scorep to work with Intel oneAPI in Spack v1 --- .../builtin/packages/scalasca/package.py | 20 ++++++++++++++++--- .../builtin/packages/scorep/package.py | 5 +++++ 2 files changed, 22 insertions(+), 3 deletions(-) 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..9b14e191f95 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 * @@ -208,6 +209,10 @@ def configure_args(self): ] cname = self.clean_compiler(spec.compiler.name) + # cname must be the legacy name of the compiler: + # --with-nocross-compiler-suite=(gcc|ibm|intel|oneapi|nvhpc|pgi|clang|aocc|amdclang|cray) + if cname in BUILTIN_TO_LEGACY_COMPILER.keys(): + cname = BUILTIN_TO_LEGACY_COMPILER[cname] config_args.extend(["--with-nocross-compiler-suite={0}".format(cname)]) if self.version >= Version("4.0"): From a568bb1e91edc58b51056d7ba645669492787c64 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 4 May 2026 07:31:43 -0600 Subject: [PATCH 2/4] Bug fix in repos/spack_repo/builtin/packages/py_pyhdf/package.py for Intel oneAPI 2026.0.0 --- repos/spack_repo/builtin/packages/py_pyhdf/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/spack_repo/builtin/packages/py_pyhdf/package.py b/repos/spack_repo/builtin/packages/py_pyhdf/package.py index 575821b5cfe..15ac5c4f6db 100644 --- a/repos/spack_repo/builtin/packages/py_pyhdf/package.py +++ b/repos/spack_repo/builtin/packages/py_pyhdf/package.py @@ -39,7 +39,7 @@ class PyPyhdf(PythonPackage): def flag_handler(self, name, flags): if name == "cflags": - if self.spec.satisfies("%gcc@14:"): + if self.spec.satisfies("%gcc@14:") or self.spec.satisfies("%oneapi@2026:"): flags.append("-Wno-error=incompatible-pointer-types") flags.append("-Wno-error=discarded-qualifiers") return (flags, None, None) From 81f359e43f1020890accdf1271331511d9a61beb Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 6 May 2026 16:43:17 -0600 Subject: [PATCH 3/4] Fix overly complicated logic to set compiler name in repos/spack_repo/builtin/packages/scorep/package.py --- .../spack_repo/builtin/packages/scorep/package.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/repos/spack_repo/builtin/packages/scorep/package.py b/repos/spack_repo/builtin/packages/scorep/package.py index 9b14e191f95..ad2dd43c3bf 100644 --- a/repos/spack_repo/builtin/packages/scorep/package.py +++ b/repos/spack_repo/builtin/packages/scorep/package.py @@ -195,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 @@ -208,11 +214,9 @@ 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) - # cname must be the legacy name of the compiler: - # --with-nocross-compiler-suite=(gcc|ibm|intel|oneapi|nvhpc|pgi|clang|aocc|amdclang|cray) - if cname in BUILTIN_TO_LEGACY_COMPILER.keys(): - cname = BUILTIN_TO_LEGACY_COMPILER[cname] config_args.extend(["--with-nocross-compiler-suite={0}".format(cname)]) if self.version >= Version("4.0"): From f391a04211504657153db695f839ed7516775f45 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 6 May 2026 16:43:17 -0600 Subject: [PATCH 4/4] Fix overly complicated logic to set compiler name in repos/spack_repo/builtin/packages/scorep/package.py