Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions site/spack_repo/alps/packages/cray_mpich/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down Expand Up @@ -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"""
Expand Down Expand Up @@ -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.
Expand Down