summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGvozden Neskovic <neskovic@gmail.com>2020-09-08 14:52:56 +0200
committerGitHub <noreply@github.com>2020-09-08 06:52:56 -0600
commitc2b33b444411872641f27b7a8728cd28d8fb934e (patch)
tree5cd799ed7cd80483ca1b1cd6821df96d554d8e89 /var
parent73110b415d7dfeabb9f4e93f63f13c1bf10dd14d (diff)
downloadspack-c2b33b444411872641f27b7a8728cd28d8fb934e.tar.gz
spack-c2b33b444411872641f27b7a8728cd28d8fb934e.tar.bz2
spack-c2b33b444411872641f27b7a8728cd28d8fb934e.tar.xz
spack-c2b33b444411872641f27b7a8728cd28d8fb934e.zip
gromacs: add zen2 target SIMD optimizations (#18551)
Co-authored-by: Gvozden Nešković <neskovic@dev06.compeng.uni-frankfurt.de>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index a5e55b9bb2..56552f3a8a 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -145,12 +145,15 @@ class Gromacs(CMakePackage):
# Activate SIMD based on properties of the target
target = self.spec.target
- if target >= llnl.util.cpu.targets['bulldozer']:
- # AMD Family 15h
- options.append('-DGMX_SIMD=AVX_128_FMA')
+ if target >= llnl.util.cpu.targets['zen2']:
+ # AMD Family 17h (EPYC Rome)
+ options.append('-DGMX_SIMD=AVX2_256')
elif target >= llnl.util.cpu.targets['zen']:
- # AMD Family 17h
+ # AMD Family 17h (EPYC Naples)
options.append('-DGMX_SIMD=AVX2_128')
+ elif target >= llnl.util.cpu.targets['bulldozer']:
+ # AMD Family 15h
+ options.append('-DGMX_SIMD=AVX_128_FMA')
elif target >= llnl.util.cpu.targets['power7']:
# IBM Power 7 and beyond
options.append('-DGMX_SIMD=IBM_VSX')