From bcf8ebff4ff3ca25c17e690187b1e7cf46657ee5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 8 Jun 2020 18:44:07 -0500 Subject: 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 --- var/spack/repos/builtin/packages/mpich/package.py | 9 ++++++--- var/spack/repos/builtin/packages/mvapich2/package.py | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'var') 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 -- cgit v1.2.3-60-g2f50