summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com>2023-05-29 14:40:09 +0530
committerGitHub <noreply@github.com>2023-05-29 11:10:09 +0200
commitf057d7154b25440d1bdd3c7680840fed695f6693 (patch)
tree00d45fa776ac7aaa58c3e1499bcb29f461066c95 /var
parenta102950d67f4b726c9f0ff48a1ad0f15ad174fd8 (diff)
downloadspack-f057d7154b25440d1bdd3c7680840fed695f6693.tar.gz
spack-f057d7154b25440d1bdd3c7680840fed695f6693.tar.bz2
spack-f057d7154b25440d1bdd3c7680840fed695f6693.tar.xz
spack-f057d7154b25440d1bdd3c7680840fed695f6693.zip
NAMD: add AVXTILES support (#37040)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/namd/package.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/namd/package.py b/var/spack/repos/builtin/packages/namd/package.py
index 5fd5cd2430..68254ac114 100644
--- a/var/spack/repos/builtin/packages/namd/package.py
+++ b/var/spack/repos/builtin/packages/namd/package.py
@@ -22,6 +22,7 @@ class Namd(MakefilePackage, CudaPackage):
manual_download = True
version("master", branch="master")
+ version("2.15a2", sha256="8748cbaa93fc480f92fc263d9323e55bce6623fc693dbfd4a40f59b92669713e")
version("2.15a1", branch="master", tag="release-2-15-alpha-1")
# Same as above, but lets you use a local file instead of git
version(
@@ -49,6 +50,8 @@ class Namd(MakefilePackage, CudaPackage):
description="Enables Tcl and/or python interface",
)
+ variant("avxtiles", when="target=x86_64_v4:", default=False, description="Enable avxtiles")
+
# init_tcl_pointers() declaration and implementation are inconsistent
# "src/colvarproxy_namd.C", line 482: error: inherited member is not
# allowed
@@ -73,6 +76,8 @@ class Namd(MakefilePackage, CudaPackage):
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")
+
# 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
@@ -127,6 +132,7 @@ class Namd(MakefilePackage, CudaPackage):
-ffast-math -lpthread "
+ archopt,
"intel": "-O2 -ip -qopenmp-simd" + archopt,
+ "clang": m64 + "-O3 -ffast-math -fopenmp " + archopt,
"aocc": m64
+ "-O3 -ffp-contract=fast -ffast-math \
-fopenmp "
@@ -139,12 +145,19 @@ class Namd(MakefilePackage, CudaPackage):
-ffast-math -lpthread "
+ archopt,
"intel": "-O2 -ip " + archopt,
+ "clang": m64 + "-O3 -ffast-math -fopenmp " + archopt,
"aocc": m64
+ "-O3 -ffp-contract=fast \
-ffast-math "
+ archopt,
}
+ if self.spec.satisfies("+avxtiles"):
+ optims_opts["aocc"] += " -DNAMD_AVXTILES"
+ optims_opts["clang"] += " -DNAMD_AVXTILES"
+ optims_opts["gcc"] += " -DNAMD_AVXTILES"
+ optims_opts["intel"] += " -DNAMD_AVXTILES"
+
optim_opts = (
optims_opts[self.compiler.name] if self.compiler.name in optims_opts else ""
)
@@ -265,6 +278,7 @@ class Namd(MakefilePackage, CudaPackage):
with working_dir(self.build_directory):
mkdirp(prefix.bin)
install("namd2", prefix.bin)
+ install("psfgen", prefix.bin)
# I'm not sure this is a good idea or if an autoload of the charm
# module would not be better.