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:
parent
88794f56ed
commit
d431fcd904
1 changed files with 10 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue