mpich, openmpi: fix setting up dependent build environment
This commit is contained in:
parent
787f7d7729
commit
1da005f6bd
@ -899,10 +899,16 @@ def setup_run_environment(self, env):
|
|||||||
def setup_dependent_build_environment(self, env, dependent_spec):
|
def setup_dependent_build_environment(self, env, dependent_spec):
|
||||||
# Use the spack compiler wrappers under MPI
|
# Use the spack compiler wrappers under MPI
|
||||||
dependent_module = dependent_spec.package.module
|
dependent_module = dependent_spec.package.module
|
||||||
env.set("OMPI_CC", dependent_module.spack_cc)
|
for var_name, attr_name in (
|
||||||
env.set("OMPI_CXX", dependent_module.spack_cxx)
|
("OMPI_CC", "spack_cc"),
|
||||||
env.set("OMPI_FC", dependent_module.spack_fc)
|
("OMPI_CXX", "spack_cxx"),
|
||||||
env.set("OMPI_F77", dependent_module.spack_f77)
|
("OMPI_FC", "spack_fc"),
|
||||||
|
("OMPI_F77", "spack_f77"),
|
||||||
|
):
|
||||||
|
if not hasattr(dependent_module, attr_name):
|
||||||
|
continue
|
||||||
|
|
||||||
|
env.set(var_name, getattr(dependent_module, attr_name))
|
||||||
|
|
||||||
# See https://www.open-mpi.org/faq/?category=building#installdirs
|
# See https://www.open-mpi.org/faq/?category=building#installdirs
|
||||||
for suffix in [
|
for suffix in [
|
||||||
|
Loading…
Reference in New Issue
Block a user