From 007ff2a6b08ec181f0281de8f5535fda41ae3ec1 Mon Sep 17 00:00:00 2001 From: fcannini Date: Wed, 2 Dec 2020 16:22:12 -0300 Subject: namd: added cuda support (#20143) --- var/spack/repos/builtin/packages/namd/package.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'var') 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) -- cgit v1.2.3-60-g2f50