summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-09-22 21:11:35 +0200
committerGitHub <noreply@github.com>2020-09-22 13:11:35 -0600
commit92b8177b7713d830267bda40781e47ca97af6b3d (patch)
tree9cc2dc2f46a3a0a2962ca802cfcf949de5aab017 /var
parentacf4dc2e12df65aab265a6f5a8374cf356b740bd (diff)
downloadspack-92b8177b7713d830267bda40781e47ca97af6b3d.tar.gz
spack-92b8177b7713d830267bda40781e47ca97af6b3d.tar.bz2
spack-92b8177b7713d830267bda40781e47ca97af6b3d.tar.xz
spack-92b8177b7713d830267bda40781e47ca97af6b3d.zip
gromacs: remove 'rdtscp' variant, deduce the flag from the target (#18868)
refers #18858
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index 56552f3a8a..038b7b5cae 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -65,8 +65,6 @@ class Gromacs(CMakePackage):
description='The build type to build',
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel',
'Reference', 'RelWithAssert', 'Profile'))
- variant('rdtscp', default=True,
- description='Enable RDTSCP instruction usage')
variant('mdrun_only', default=False,
description='Enables the build of a cut-down version'
' of libgromacs and/or the mdrun program')
@@ -181,10 +179,11 @@ class Gromacs(CMakePackage):
# Fall back to this for unknown microarchitectures
options.append('-DGMX_SIMD:STRING=None')
- if '-rdtscp' in self.spec:
- options.append('-DGMX_USE_RDTSCP:BOOL=OFF')
- else:
- options.append('-DGMX_USE_RDTSCP:BOOL=ON')
+ # Use the 'rtdscp' assembly instruction only on
+ # appropriate architectures
+ options.append(self.define(
+ 'GMX_USE_RDTSCP', str(target.family) in ('x86_64', 'x86')
+ ))
if '+mdrun_only' in self.spec:
options.append('-DGMX_BUILD_MDRUN_ONLY:BOOL=ON')