summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-06-08 18:44:07 -0500
committerGitHub <noreply@github.com>2020-06-08 16:44:07 -0700
commitbcf8ebff4ff3ca25c17e690187b1e7cf46657ee5 (patch)
tree99d2768d66bb31f4bbbf9b2f29ca67d54c40e042 /var
parent6f9bfec32ec98bff24d00324ef7f9128e74ba87e (diff)
downloadspack-bcf8ebff4ff3ca25c17e690187b1e7cf46657ee5.tar.gz
spack-bcf8ebff4ff3ca25c17e690187b1e7cf46657ee5.tar.bz2
spack-bcf8ebff4ff3ca25c17e690187b1e7cf46657ee5.tar.xz
spack-bcf8ebff4ff3ca25c17e690187b1e7cf46657ee5.zip
Cray: fix Blue Waters support and user-built MPIs on Cray (#16593)
* Cray: fix Blue Waters support * pkg-config env vars needed on Blue Waters * cray platform: fix support for user-build MPI on cray machines * reintroduce cray environment cleaning behind cnl version guard * cray platform: fix support for user-build MPI on cray machines Co-authored-by: Gregory <becker33@llnl.gov>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py9
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py9
2 files changed, 12 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 7b8c807cce..042c2c5b12 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -161,8 +161,9 @@ spack package at this time.''',
env.set('FFLAGS', '-fallow-argument-mismatch')
def setup_dependent_build_environment(self, env, dependent_spec):
- # On Cray, the regular compiler wrappers *are* the MPI wrappers.
- if 'platform=cray' in self.spec:
+ # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
+ # Cray MPIs always have cray in the module name, e.g. "cray-mpich"
+ if self.spec.external_module and 'cray' in self.spec.external_module:
env.set('MPICC', spack_cc)
env.set('MPICXX', spack_cxx)
env.set('MPIF77', spack_fc)
@@ -180,7 +181,9 @@ spack package at this time.''',
env.set('MPICH_FC', spack_fc)
def setup_dependent_package(self, module, dependent_spec):
- if 'platform=cray' in self.spec:
+ # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
+ # Cray MPIs always have cray in the module name, e.g. "cray-mpich"
+ if self.spec.external_module and 'cray' in self.spec.external_module:
self.spec.mpicc = spack_cc
self.spec.mpicxx = spack_cxx
self.spec.mpifc = spack_fc
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index 04205b6e24..0fb3c36b28 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -209,8 +209,9 @@ class Mvapich2(AutotoolsPackage):
env.set('SLURM_MPI_TYPE', 'pmi2')
def setup_dependent_build_environment(self, env, dependent_spec):
- # On Cray, the regular compiler wrappers *are* the MPI wrappers.
- if 'platform=cray' in self.spec:
+ # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
+ # Cray MPIs always have cray in the module name, e.g. "cray-mvapich"
+ if self.spec.external_module and 'cray' in self.spec.external_module:
env.set('MPICC', spack_cc)
env.set('MPICXX', spack_cxx)
env.set('MPIF77', spack_fc)
@@ -228,7 +229,9 @@ class Mvapich2(AutotoolsPackage):
env.set('MPICH_FC', spack_fc)
def setup_dependent_package(self, module, dependent_spec):
- if 'platform=cray' in self.spec:
+ # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers.
+ # Cray MPIs always have cray in the module name, e.g. "cray-mvapich"
+ if self.spec.external_module and 'cray' in self.spec.external_module:
self.spec.mpicc = spack_cc
self.spec.mpicxx = spack_cxx
self.spec.mpifc = spack_fc