summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Cohn <rscohn2@gmail.com>2021-01-08 13:47:03 -0500
committerTamara Dahlgren <dahlgren1@llnl.gov>2021-02-17 17:07:41 -0800
commit1df8e1daca8e448b267d88306fd65e77118ecd72 (patch)
tree57b29c120ed21e58ae622048f0832a1a19a9d3f2
parent7e5f72817c7c6b3aa7f0b435bc695ccde352f06b (diff)
downloadspack-1df8e1daca8e448b267d88306fd65e77118ecd72.tar.gz
spack-1df8e1daca8e448b267d88306fd65e77118ecd72.tar.bz2
spack-1df8e1daca8e448b267d88306fd65e77118ecd72.tar.xz
spack-1df8e1daca8e448b267d88306fd65e77118ecd72.zip
intel-oneapi-mpi: virtual provider support (#20732)
Set up environment and dependent packages properly when building with intel-oneapi-mpi as a dependency MPI provider (e.g. point to mpicc compiler wrapper).
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
index f6354fe64a..5e22d0de29 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
@@ -28,6 +28,20 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
url_name='mpi_oneapi')
super(IntelOneapiMpi, self).__init__(spec)
+ def setup_dependent_package(self, module, dep_spec):
+ dir = join_path(self.prefix, 'mpi', 'latest', 'bin')
+ self.spec.mpicc = join_path(dir, 'mpicc')
+ self.spec.mpicxx = join_path(dir, 'mpicxx')
+ self.spec.mpif77 = join_path(dir, 'mpif77')
+ self.spec.mpifc = join_path(dir, 'mpifc')
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.set('MPICH_CC', spack_cc)
+ env.set('MPICH_CXX', spack_cxx)
+ env.set('MPICH_F77', spack_f77)
+ env.set('MPICH_F90', spack_fc)
+ env.set('MPICH_FC', spack_fc)
+
@property
def libs(self):
libs = []