summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com>2024-09-09 10:42:16 +0530
committerGitHub <noreply@github.com>2024-09-09 07:12:16 +0200
commit216619bb531f966e6cb08607f4fdd2addbfbdde9 (patch)
treeb8bfd2cd393834169aed96a62c7e13b03dc219ea /var
parent47c771f03f9094da6f50e824fb0e12ac40f9a5c8 (diff)
downloadspack-216619bb531f966e6cb08607f4fdd2addbfbdde9.tar.gz
spack-216619bb531f966e6cb08607f4fdd2addbfbdde9.tar.bz2
spack-216619bb531f966e6cb08607f4fdd2addbfbdde9.tar.xz
spack-216619bb531f966e6cb08607f4fdd2addbfbdde9.zip
namd: variant updates (#45825)
* Add missing variant, already used in recipe (avxtiles) * Add memopt variant Co-authored-by: viveshar <vivek.sharma2@amd.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/namd/package.py26
1 files changed, 24 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/namd/package.py b/var/spack/repos/builtin/packages/namd/package.py
index 273835e07e..2e9fc20f79 100644
--- a/var/spack/repos/builtin/packages/namd/package.py
+++ b/var/spack/repos/builtin/packages/namd/package.py
@@ -75,9 +75,24 @@ class Namd(MakefilePackage, CudaPackage, ROCmPackage):
description="Enables Tcl and/or python interface",
)
- variant("avxtiles", when="target=x86_64_v4:", default=False, description="Enable avxtiles")
+ variant(
+ "avxtiles",
+ when="target=x86_64_v4: @2.15:",
+ default=False,
+ description="Enable avxtiles supported with NAMD 2.15+",
+ )
variant("single_node_gpu", default=False, description="Single node GPU")
+ # Adding memopt variant to build memory-optimized mode that utilizes a compressed
+ # version of the molecular structure and also supports parallel I/O.
+ # Refer: https://www.ks.uiuc.edu/Research/namd/wiki/index.cgi?NamdMemoryReduction
+ variant(
+ "memopt",
+ when="@2.8:",
+ default=False,
+ description="Enable memory-optimized build supported with NAMD 2.8+",
+ )
+
# init_tcl_pointers() declaration and implementation are inconsistent
# "src/colvarproxy_namd.C", line 482: error: inherited member is not
# allowed
@@ -103,9 +118,13 @@ class Namd(MakefilePackage, CudaPackage, ROCmPackage):
depends_on("tcl", when="interface=python")
depends_on("python", when="interface=python")
- conflicts("+avxtiles", when="@:2.14,3:", msg="AVXTiles algorithm requires NAMD 2.15")
conflicts("+rocm", when="+cuda", msg="NAMD supports only one GPU backend at a time")
conflicts("+single_node_gpu", when="~cuda~rocm")
+ conflicts(
+ "+memopt",
+ when="+single_node_gpu",
+ msg="memopt mode is not compatible with GPU-resident builds",
+ )
# https://www.ks.uiuc.edu/Research/namd/2.12/features.html
# https://www.ks.uiuc.edu/Research/namd/2.13/features.html
@@ -304,6 +323,9 @@ class Namd(MakefilePackage, CudaPackage, ROCmPackage):
if "+single_node_gpu" in spec:
opts.extend(["--with-single-node-hip"])
+ if spec.satisfies("+memopt"):
+ opts.append("--with-memopt")
+
config = Executable("./config")
config(self.build_directory, *opts)