summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 60d82528af..64bff6ae4b 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -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 @@ class Dealii(CMakePackage):
'-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([