dealii: add cuda support (#5402)
This commit is contained in:
parent
96927deb30
commit
b8a7b2e9a0
1 changed files with 17 additions and 0 deletions
|
@ -82,6 +82,8 @@ class Dealii(CMakePackage):
|
|||
variant('build_type', default='DebugRelease',
|
||||
description='The build type to build',
|
||||
values=('Debug', 'Release', 'DebugRelease'))
|
||||
variant('cuda', default=False,
|
||||
description='Build with CUDA')
|
||||
|
||||
# required dependencies, light version
|
||||
depends_on("blas")
|
||||
|
@ -123,6 +125,8 @@ class Dealii(CMakePackage):
|
|||
depends_on("graphviz", when='+doc')
|
||||
depends_on("gsl", when='@8.5.0:+gsl')
|
||||
depends_on("hdf5+mpi", when='+hdf5+mpi')
|
||||
depends_on("cuda@8:", when='+cuda')
|
||||
depends_on("cmake@3.9:", when='+cuda')
|
||||
# FIXME: concretizer bug. The two lines mimic what comes from PETSc
|
||||
# but we should not need it
|
||||
depends_on("metis@5:+int64+real64", when='+metis+int64')
|
||||
|
@ -149,6 +153,7 @@ class Dealii(CMakePackage):
|
|||
conflicts('+adol-c', when='@:8.5.1')
|
||||
conflicts('+gsl', when='@:8.4.2')
|
||||
conflicts('+python', when='@:8.4.2')
|
||||
conflicts('+cuda', when='%gcc@6:')
|
||||
for p in ['+arpack', '+hdf5', '+netcdf', '+p4est', '+petsc',
|
||||
'+slepc', '+trilinos']:
|
||||
conflicts(p, when='~mpi')
|
||||
|
@ -212,6 +217,18 @@ def cmake_args(self):
|
|||
'-DDEAL_II_DOCHTML_RELDIR=share/deal.II/doc'
|
||||
])
|
||||
|
||||
# CUDA
|
||||
# FIXME -DDEAL_II_CUDA_FLAGS="-arch=sm_60"
|
||||
if '+cuda' in spec:
|
||||
options.extend([
|
||||
'-DDEAL_II_WITH_CUDA=ON',
|
||||
'-DDEAL_II_WITH_CXX14=OFF'
|
||||
])
|
||||
else:
|
||||
options.extend([
|
||||
'-DDEAL_II_WITH_CUDA=OFF',
|
||||
])
|
||||
|
||||
# MPI
|
||||
if '+mpi' in spec:
|
||||
options.extend([
|
||||
|
|
Loading…
Reference in a new issue