diff options
author | 健美猫 <weijianwen@gmail.com> | 2017-03-24 20:48:08 +0800 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-03-24 07:48:08 -0500 |
commit | c68295df2c0d45eaf79a882c81bd06b5b663e5a5 (patch) | |
tree | 5fc09ecd76c0400f04e9339e06906f5cf7761a30 | |
parent | 4a36f23fa8c6b21a22999b6d376c276b8211d4b2 (diff) | |
download | spack-c68295df2c0d45eaf79a882c81bd06b5b663e5a5.tar.gz spack-c68295df2c0d45eaf79a882c81bd06b5b663e5a5.tar.bz2 spack-c68295df2c0d45eaf79a882c81bd06b5b663e5a5.tar.xz spack-c68295df2c0d45eaf79a882c81bd06b5b663e5a5.zip |
Add cuda support for gromacs. (#3527)
-rw-r--r-- | var/spack/repos/builtin/packages/gromacs/package.py | 9 |
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 |