gromacs: add sve variant on aarch64 (#35614)

This commit is contained in:
Annop Wongwathanarat 2023-03-08 09:25:36 +00:00 committed by GitHub
parent cbd0770497
commit 983a56e729
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,6 +113,15 @@ class Gromacs(CMakePackage):
"+mdrun_only", when="@2021:", msg="mdrun-only build option was removed for GROMACS 2021."
)
variant("openmp", default=True, description="Enables OpenMP at configure time")
variant(
"sve",
default=True,
description="Enable SVE on aarch64 if available",
when="target=neoverse_v1",
)
variant(
"sve", default=True, description="Enable SVE on aarch64 if available", when="target=a64fx"
)
variant(
"relaxed_double_precision",
default=False,
@ -450,6 +459,8 @@ def cmake_args(self):
# ARMv8
if self.spec.satisfies("%nvhpc"):
options.append("-DGMX_SIMD=None")
elif "sve" in target.features and "+sve" in self.spec:
options.append("-DGMX_SIMD=ARM_SVE")
else:
options.append("-DGMX_SIMD=ARM_NEON_ASIMD")
elif target == "mic_knl":