Add cuda support for gromacs. (#3527)
This commit is contained in:
parent
4a36f23fa8
commit
c68295df2c
@ -51,14 +51,14 @@ class Gromacs(CMakePackage):
|
|||||||
'double', default=False,
|
'double', default=False,
|
||||||
description='Produces a double precision version of the executables')
|
description='Produces a double precision version of the executables')
|
||||||
variant('plumed', default=False, description='Enable PLUMED support')
|
variant('plumed', default=False, description='Enable PLUMED support')
|
||||||
|
variant('cuda', default=False, description='Enable CUDA support')
|
||||||
|
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
depends_on('plumed+mpi', when='+plumed+mpi')
|
depends_on('plumed+mpi', when='+plumed+mpi')
|
||||||
depends_on('plumed~mpi', when='+plumed~mpi')
|
depends_on('plumed~mpi', when='+plumed~mpi')
|
||||||
depends_on('fftw')
|
depends_on('fftw')
|
||||||
depends_on('cmake@2.8.8:', type='build')
|
depends_on('cmake@2.8.8:', type='build')
|
||||||
|
depends_on('cuda', when='+cuda')
|
||||||
# TODO : add GPU support
|
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
if '+plumed' in self.spec:
|
if '+plumed' in self.spec:
|
||||||
@ -82,4 +82,9 @@ def cmake_args(self):
|
|||||||
else:
|
else:
|
||||||
options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
|
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
|
return options
|
||||||
|
Loading…
Reference in New Issue
Block a user