diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-10-11 06:46:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-11 06:46:29 -0700 |
commit | 1dff309a3f331b8ed752c7151ff9d178d12da756 (patch) | |
tree | c057e6a039b96c6e5842bdcd5d5e26cd3a0aa0b7 /var | |
parent | f9d8325cc2674e087890e704e6446a87f6d45cad (diff) | |
parent | 3553c8b9e92f81e53c607c574b1b746e03039ac7 (diff) | |
download | spack-1dff309a3f331b8ed752c7151ff9d178d12da756.tar.gz spack-1dff309a3f331b8ed752c7151ff9d178d12da756.tar.bz2 spack-1dff309a3f331b8ed752c7151ff9d178d12da756.tar.xz spack-1dff309a3f331b8ed752c7151ff9d178d12da756.zip |
Merge pull request #1989 from KineticTheory/cray_compile_wrappers
On Cray machines, use the Cray compile wrappers instead of MPI wrappers.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/mpich/package.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 8d1b23c5be..bb034f9fc7 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -63,10 +63,18 @@ class Mpich(Package): spack_env.set('MPICH_FC', spack_fc) def setup_dependent_package(self, module, dep_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') + # Is this a Cray machine? (TODO: We need a better test than this.) + if os.environ.get('CRAYPE_VERSION'): + self.spec.mpicc = spack_cc + self.spec.mpicxx = spack_cxx + self.spec.mpifc = spack_fc + self.spec.mpif77 = spack_f77 + else: + 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') + self.spec.mpicxx_shared_libs = [ join_path(self.prefix.lib, 'libmpicxx.{0}'.format(dso_suffix)), join_path(self.prefix.lib, 'libmpi.{0}'.format(dso_suffix)) |