summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index fd5814ca08..40d7858816 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -51,14 +51,14 @@ class Gromacs(CMakePackage):
'double', default=False,
description='Produces a double precision version of the executables')
variant('plumed', default=False, description='Enable PLUMED support')
+ variant('cuda', default=False, description='Enable CUDA support')
depends_on('mpi', when='+mpi')
depends_on('plumed+mpi', when='+plumed+mpi')
depends_on('plumed~mpi', when='+plumed~mpi')
depends_on('fftw')
depends_on('cmake@2.8.8:', type='build')
-
- # TODO : add GPU support
+ depends_on('cuda', when='+cuda')
def patch(self):
if '+plumed' in self.spec:
@@ -82,4 +82,9 @@ class Gromacs(CMakePackage):
else:
options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
+ if '+cuda' in self.spec:
+ options.append('-DGMX_GPU:BOOL=ON')
+ options.append('-DCUDA_TOOLKIT_ROOT_DIR:STRING=' +
+ self.spec['cuda'].prefix)
+
return options