summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorChristoph Junghans <junghans@lanl.gov>2019-10-18 10:36:40 -0600
committerGitHub <noreply@github.com>2019-10-18 10:36:40 -0600
commitb4383825be628e3493da316937995df4fef9ab00 (patch)
treee535aad3a055d6c29f9f823ec7387a7d5b5e8cf0 /var
parent40a11c6bf6f99eff333c7483c695bdb1aab523c9 (diff)
downloadspack-b4383825be628e3493da316937995df4fef9ab00.tar.gz
spack-b4383825be628e3493da316937995df4fef9ab00.tar.bz2
spack-b4383825be628e3493da316937995df4fef9ab00.tar.xz
spack-b4383825be628e3493da316937995df4fef9ab00.zip
fftw: altivec only works for float (#13242)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 82bd0c7aa7..895bb53c3e 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -137,19 +137,21 @@ class Fftw(AutotoolsPackage):
if '+mpi' in spec:
options.append('--enable-mpi')
- # Specific SIMD support. Note there's SSE support too for float, but
- # given that it can be activated only for float and that most machines
- # are new enough to have SSE2 it has been skipped not to complicate the
- # recipe further.
+ # Specific SIMD support.
+ # all precisions
simd_features = ['sse2', 'avx', 'avx2', 'avx512', 'avx-128-fma',
- 'kcvi', 'altivec', 'vsx', 'neon']
+ 'kcvi', 'vsx', 'neon']
+ # float only
+ float_simd_features = ['altivec', 'sse']
+
simd_options = []
for feature in simd_features:
msg = '--enable-{0}' if feature in spec.target else '--disable-{0}'
simd_options.append(msg.format(feature))
# If no features are found, enable the generic ones
- if not any(f in spec.target for f in simd_features):
+ if not any(f in spec.target for f in
+ simd_features + float_simd_features):
simd_options += [
'--enable-generic-simd128',
'--enable-generic-simd256'
@@ -178,6 +180,15 @@ class Fftw(AutotoolsPackage):
if precision in ('float', 'double') and spec.satisfies('@3:'):
opts += simd_options
+ # float-only acceleration
+ if precision == 'float':
+ for feature in float_simd_features:
+ if feature in spec.target:
+ msg = '--enable-{0}'
+ else:
+ msg = '--disable-{0}'
+ opts.append(msg.format(feature))
+
with working_dir(precision, create=True):
configure(*opts)