Added CUDAHOSTCXX variable needed to compile with cuda and mpi. (#19254)

* Added CUDAHOSTCXX variable needed to compile with cuda and mpi.

* Added guard for setting CUDAHOSTCXX with MPI.

* Acceptable working version of dealii+cuda+mpi.
This commit is contained in:
David M. Rogers 2020-10-12 05:28:06 -04:00 committed by GitHub
parent 88794f56ed
commit d431fcd904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -394,6 +394,11 @@ def cmake_args(self):
self.define('MPI_CXX_COMPILER', spec['mpi'].mpicxx),
self.define('MPI_Fortran_COMPILER', spec['mpi'].mpifc)
])
if '+cuda' in spec:
options.extend([
self.define('DEAL_II_MPI_WITH_CUDA_SUPPORT', True),
self.define('CUDA_HOST_COMPILER', spec['mpi'].mpicxx)
])
# Python bindings
if spec.satisfies('@8.5.0:'):
@ -526,3 +531,8 @@ def cmake_args(self):
def setup_run_environment(self, env):
env.set('DEAL_II_DIR', self.prefix)
def setup_build_environment(self, env):
spec = self.spec
if '+cuda' in spec and '+mpi' in spec:
env.set('CUDAHOSTCXX', spec['mpi'].mpicxx)