diff options
author | Denis Davydov <davydden@gmail.com> | 2016-05-04 10:37:52 +0200 |
---|---|---|
committer | Denis Davydov <davydden@gmail.com> | 2016-05-04 10:37:52 +0200 |
commit | c3317819cb89abdcd9fe1cb9431436c4e4ef8702 (patch) | |
tree | 8ba7ee1c701208822df6b8380a1e1ca9de2c40cf /var/spack | |
parent | 60048c655022c3bf151c6984360ee0ce6e0cf18d (diff) | |
download | spack-c3317819cb89abdcd9fe1cb9431436c4e4ef8702.tar.gz spack-c3317819cb89abdcd9fe1cb9431436c4e4ef8702.tar.bz2 spack-c3317819cb89abdcd9fe1cb9431436c4e4ef8702.tar.xz spack-c3317819cb89abdcd9fe1cb9431436c4e4ef8702.zip |
mpi: add self.spec.[mpicc|mpicxx|mpifc|mpif77] to avoid hardcoding MPI wrappers names
Diffstat (limited to 'var/spack')
-rw-r--r-- | var/spack/repos/builtin/packages/mpich/package.py | 5 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openmpi/package.py | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index b317ec6651..aaa6386df7 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -54,6 +54,11 @@ class Mpich(Package): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + 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') + def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 3cb9b0be21..89a21e869c 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -45,6 +45,11 @@ class Openmpi(Package): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) + 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') + def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, |