From fe61ffcc354a4094c5ae261b239f50801c38be3e Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi Date: Wed, 27 Aug 2025 11:17:21 +0200 Subject: [PATCH] cray-mpich was not using spack compiler wrappers --- .../alps/packages/cray_mpich/package.py | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/site/spack_repo/alps/packages/cray_mpich/package.py b/site/spack_repo/alps/packages/cray_mpich/package.py index b2254ad..d6494bf 100644 --- a/site/spack_repo/alps/packages/cray_mpich/package.py +++ b/site/spack_repo/alps/packages/cray_mpich/package.py @@ -7,6 +7,7 @@ import platform from spack_repo.builtin.build_systems.generic import Package +from spack_repo.builtin.packages.mpich.package import MpichEnvironmentModifications import spack.compilers from spack.package import * @@ -55,7 +56,7 @@ } -class CrayMpich(Package): +class CrayMpich(MpichEnvironmentModifications, Package): """Install cray-mpich as a binary package""" """Intended to override the main cray-mpich""" @@ -129,27 +130,6 @@ class CrayMpich(Package): conflicts("%gcc@:7") conflicts("%gcc@:11", when="@8.1.28:") - def setup_run_environment(self, env): - env.set("MPICC", join_path(self.prefix.bin, "mpicc")) - env.set("MPICXX", join_path(self.prefix.bin, "mpic++")) - env.set("MPIF77", join_path(self.prefix.bin, "mpif77")) - env.set("MPIF90", join_path(self.prefix.bin, "mpif90")) - - def setup_dependent_build_environment(self, env, dependent_spec): - self.setup_run_environment(env) - if "c" in dependent_spec: - env.set("MPICH_CC", dependent_spec["c"].package.cc) - if"cxx" in dependent_spec: - env.set("MPICH_CXX", dependent_spec["cxx"].package.cxx) - if "fortran" in dependent_spec: - env.set("MPICH_FC", dependent_spec["fortran"].package.fortran) - - def setup_dependent_package(self, module, dependent_spec): - self.spec.mpicc = join_path(self.prefix.bin, "mpicc") - self.spec.mpicxx = join_path(self.prefix.bin, "mpic++") - self.spec.mpifc = join_path(self.prefix.bin, "mpif90") - self.spec.mpif77 = join_path(self.prefix.bin, "mpif77") - def get_rpaths(self): # Those rpaths are already set in the build environment, so # let's just retrieve them.