diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/mpich/package.py | 9 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/mvapich2/package.py | 9 |
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 |