diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-11-01 13:16:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-01 13:16:59 +0100 |
commit | e4a5a06e87c2176077c405d2ddb59e3783ae6518 (patch) | |
tree | e3b3228c389faa26600e2b2082c7d3aaa9fcf713 /var | |
parent | 77fc458d2964490c83863d667df10b9a740ce05e (diff) | |
download | spack-e4a5a06e87c2176077c405d2ddb59e3783ae6518.tar.gz spack-e4a5a06e87c2176077c405d2ddb59e3783ae6518.tar.bz2 spack-e4a5a06e87c2176077c405d2ddb59e3783ae6518.tar.xz spack-e4a5a06e87c2176077c405d2ddb59e3783ae6518.zip |
gromacs: simplified use of targets (#19646)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/gromacs/package.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 20bdaa2c20..73f4ffd871 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -2,9 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import archspec.cpu - - class Gromacs(CMakePackage): """GROMACS (GROningen MAchine for Chemical Simulations) is a molecular dynamics package primarily designed for simulations of proteins, lipids @@ -158,25 +155,25 @@ class Gromacs(CMakePackage): # Activate SIMD based on properties of the target target = self.spec.target - if target >= archspec.cpu.TARGETS['zen2']: + if target >= 'zen2': # AMD Family 17h (EPYC Rome) options.append('-DGMX_SIMD=AVX2_256') - elif target >= archspec.cpu.TARGETS['zen']: + elif target >= 'zen': # AMD Family 17h (EPYC Naples) options.append('-DGMX_SIMD=AVX2_128') - elif target >= archspec.cpu.TARGETS['bulldozer']: + elif target >= 'bulldozer': # AMD Family 15h options.append('-DGMX_SIMD=AVX_128_FMA') elif 'vsx' in target: # IBM Power 7 and beyond options.append('-DGMX_SIMD=IBM_VSX') - elif target.family == archspec.cpu.TARGETS['aarch64']: + elif target.family == 'aarch64': # ARMv8 if self.spec.satisfies('%nvhpc'): options.append('-DGMX_SIMD=None') else: options.append('-DGMX_SIMD=ARM_NEON_ASIMD') - elif target == archspec.cpu.TARGETS['mic_knl']: + elif target == 'mic_knl': # Intel KNL options.append('-DGMX_SIMD=AVX_512_KNL') elif target.vendor == 'GenuineIntel': |