From c214e4dd2d2215d2a668481e8f7c3a1e1fbe0fae Mon Sep 17 00:00:00 2001 From: QuellynSnead Date: Thu, 24 Dec 2020 21:33:57 -0700 Subject: fftw: PGI compiler has trouble with avx2/avx-512 SIMD support (#20546) * PGI compiler has trouble with avx2 SIMD support (https://github.com/FFTW/fftw3/issues/78) * Hew to the project's preferred indentation standard. * Expand '%nvhpc' logic to include '%pgi'. * Exceeded the max line-length. * Break up the long compound statement into nested if's. * Inadvertently picked up an extraneous file. * PGI compiler has trouble with avx2/avx-512 SIMD support, too. --- var/spack/repos/builtin/packages/fftw/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index f6a5e83908..a4ba9ae20c 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -111,9 +111,14 @@ class FftwBase(AutotoolsPackage): # float only float_simd_features = ['altivec', 'sse'] - # Workaround NVIDIA compiler bug when avx512 is enabled - if spec.satisfies('%nvhpc') and 'avx512' in simd_features: - simd_features.remove('avx512') + # Workaround PGI compiler bug when avx2 is enabled + if spec.satisfies('%pgi') and 'avx2' in simd_features: + simd_features.remove('avx2') + + # Workaround NVIDIA/PGI compiler bug when avx512 is enabled + if spec.satisfies('%nvhpc') or spec.satisfies('%pgi'): + if 'avx512' in simd_features: + simd_features.remove('avx512') # NVIDIA compiler does not support Altivec intrinsics if spec.satisfies('%nvhpc') and 'vsx' in simd_features: -- cgit v1.2.3-60-g2f50