summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2020-10-14 22:24:20 -0400
committerGitHub <noreply@github.com>2020-10-14 21:24:20 -0500
commite4c1cb380beb088393e47ba9caa27a2e5953b4db (patch)
tree35d4e7187669ffaf7ab0968b992b1175002292e5
parent50c7bc8cfdd042b18142ac73885686927390982d (diff)
downloadspack-e4c1cb380beb088393e47ba9caa27a2e5953b4db.tar.gz
spack-e4c1cb380beb088393e47ba9caa27a2e5953b4db.tar.bz2
spack-e4c1cb380beb088393e47ba9caa27a2e5953b4db.tar.xz
spack-e4c1cb380beb088393e47ba9caa27a2e5953b4db.zip
amrex: Add CUDA variant (#19306)
* amrex: Add CUDA variant * amrex: require at least cuda 9
-rw-r--r--var/spack/repos/builtin/packages/amrex/package.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py
index daa2e5c90f..31a28870c1 100644
--- a/var/spack/repos/builtin/packages/amrex/package.py
+++ b/var/spack/repos/builtin/packages/amrex/package.py
@@ -67,10 +67,13 @@ class Amrex(CMakePackage):
description='Enable Hypre interfaces')
variant('petsc', default=False,
description='Enable PETSc interfaces')
+ variant('cuda', default=False,
+ description='Enable CUDA interfaces')
# Build dependencies
depends_on('mpi', when='+mpi')
depends_on('sundials@4.0.0:4.1.0 +ARKODE +CVODE', when='@19.08: +sundials')
+ depends_on('cuda@9.0.0:', when='+cuda')
depends_on('python@2.7:', type='build', when='@:20.04')
depends_on('cmake@3.5:', type='build', when='@:18.10.99')
depends_on('cmake@3.13:', type='build', when='@18.11:')
@@ -127,6 +130,7 @@ class Amrex(CMakePackage):
'-DENABLE_HDF5:BOOL=%s' % self.cmake_is_on('+hdf5'),
'-DENABLE_HYPRE:BOOL=%s' % self.cmake_is_on('+hypre'),
'-DENABLE_PETSC:BOOL=%s' % self.cmake_is_on('+petsc'),
+ '-DENABLE_CUDA:BOOL=%s' % self.cmake_is_on('+cuda'),
]
if self.spec.satisfies('%fj'):
args.append('-DCMAKE_Fortran_MODDIR_FLAG=-M')