namd: variant updates (#45825)

* Add missing variant, already used in recipe (avxtiles)

* Add memopt variant 

Co-authored-by: viveshar <vivek.sharma2@amd.com>
This commit is contained in:
AMD Toolchain Support 2024-09-09 10:42:16 +05:30 committed by GitHub
parent 47c771f03f
commit 216619bb53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 @@ def edit(self, spec, prefix):
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)