diff options
author | fcannini <fcannini@gmail.com> | 2020-12-02 16:22:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 20:22:12 +0100 |
commit | 007ff2a6b08ec181f0281de8f5535fda41ae3ec1 (patch) | |
tree | dc054bc1d0ae2bbe4de2fe8dcf4f3db81e4992b1 | |
parent | 651bd50d8660d3ede7704bbb70fc96d6248de10d (diff) | |
download | spack-007ff2a6b08ec181f0281de8f5535fda41ae3ec1.tar.gz spack-007ff2a6b08ec181f0281de8f5535fda41ae3ec1.tar.bz2 spack-007ff2a6b08ec181f0281de8f5535fda41ae3ec1.tar.xz spack-007ff2a6b08ec181f0281de8f5535fda41ae3ec1.zip |
namd: added cuda support (#20143)
-rw-r--r-- | var/spack/repos/builtin/packages/namd/package.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/namd/package.py b/var/spack/repos/builtin/packages/namd/package.py index fe699ac1d9..a3aff5f4b0 100644 --- a/var/spack/repos/builtin/packages/namd/package.py +++ b/var/spack/repos/builtin/packages/namd/package.py @@ -10,7 +10,7 @@ from spack import * import llnl.util.tty as tty -class Namd(MakefilePackage): +class Namd(MakefilePackage, CudaPackage): """NAMDis a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.""" @@ -54,6 +54,12 @@ class Namd(MakefilePackage): depends_on('tcl', when='interface=python') depends_on('python', when='interface=python') + # https://www.ks.uiuc.edu/Research/namd/2.12/features.html + # https://www.ks.uiuc.edu/Research/namd/2.13/features.html + # https://www.ks.uiuc.edu/Research/namd/2.14/features.html + depends_on('cuda@6.5.14:7.5.18', when='@2.12 +cuda') + depends_on('cuda@8.0.61:', when='@2.13: +cuda') + def _copy_arch_file(self, lib): config_filename = 'arch/{0}.{1}'.format(self.arch, lib) copy('arch/Linux-x86_64.{0}'.format(lib), @@ -216,6 +222,12 @@ class Namd(MakefilePackage): '--without-python' ]) + if '+cuda' in spec: + self._append_option(opts, 'cuda') + filter_file('^CUDADIR=.*$', + 'CUDADIR={0}'.format(spec['cuda'].prefix), + self.arch + '.cuda') + config = Executable('./config') config(self.build_directory, *opts) |