summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/fftw/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/fftw/package.py')
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py76
1 files changed, 41 insertions, 35 deletions
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 05df011d74..f6a5e83908 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -5,35 +5,14 @@
import os
import os.path
-
import llnl.util.lang
-
from spack import *
-class Fftw(AutotoolsPackage):
- """FFTW is a C subroutine library for computing the discrete Fourier
- transform (DFT) in one or more dimensions, of arbitrary input
- size, and of both real and complex data (as well as of even/odd
- data, i.e. the discrete cosine/sine transforms or DCT/DST). We
- believe that FFTW, which is free software, should become the FFT
- library of choice for most applications."""
-
- homepage = "http://www.fftw.org"
- url = "http://www.fftw.org/fftw-3.3.4.tar.gz"
- list_url = "http://www.fftw.org/download.html"
-
- version('3.3.8', sha256='6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303')
- version('3.3.7', sha256='3b609b7feba5230e8f6dd8d245ddbefac324c5a6ae4186947670d9ac2cd25573')
- version('3.3.6-pl2', sha256='a5de35c5c824a78a058ca54278c706cdf3d4abba1c56b63531c2cb05f5d57da2')
- version('3.3.5', sha256='8ecfe1b04732ec3f5b7d279fdb8efcad536d555f9d1e8fabd027037d45ea8bcf')
- version('3.3.4', sha256='8f0cde90929bc05587c3368d2f15cd0530a60b8a9912a8e2979a72dbe5af0982')
- version('2.1.5', sha256='f8057fae1c7df8b99116783ef3e94a6a44518d49c72e2e630c24b689c6022630')
-
- patch('pfft-3.3.5.patch', when="@3.3.5:+pfft_patches", level=0)
- patch('pfft-3.3.4.patch', when="@3.3.4+pfft_patches", level=0)
- patch('pgi-3.3.6-pl2.patch', when="@3.3.6-pl2%pgi", level=0)
- patch('intel-configure.patch', when="@3:3.3.8%intel", level=0)
+class FftwBase(AutotoolsPackage):
+ """Base class for building Fftw, shared with the AMD optimized version
+ of the library in the 'amdfftw' package.
+ """
variant(
'precision', values=any_combination_of(
@@ -43,14 +22,9 @@ class Fftw(AutotoolsPackage):
)
variant('openmp', default=False, description="Enable OpenMP support.")
variant('mpi', default=True, description='Activate MPI support')
- variant(
- 'pfft_patches', default=False,
- description='Add extra transpose functions for PFFT compatibility')
depends_on('mpi', when='+mpi')
- depends_on('automake', type='build', when='+pfft_patches')
- depends_on('autoconf', type='build', when='+pfft_patches')
- depends_on('libtool', type='build', when='+pfft_patches')
+ depends_on('llvm-openmp', when='%apple-clang +openmp')
# https://github.com/FFTW/fftw3/commit/902d0982522cdf6f0acd60f01f59203824e8e6f3
conflicts('%gcc@8:8.9999', when="@3.3.7")
@@ -58,10 +32,6 @@ class Fftw(AutotoolsPackage):
msg='Long double precision is not supported in FFTW 2')
conflicts('precision=quad', when='@2.1.5',
msg='Quad precision is not supported in FFTW 2')
- conflicts('+openmp', when='%apple-clang', msg="Apple's clang does not support OpenMP")
-
- provides('fftw-api@2', when='@2.1.5')
- provides('fftw-api@3', when='@3:')
@property
def libs(self):
@@ -218,3 +188,39 @@ class Fftw(AutotoolsPackage):
def install(self, spec, prefix):
self.for_each_precision_make('install')
+
+
+class Fftw(FftwBase):
+ """FFTW is a C subroutine library for computing the discrete Fourier
+ transform (DFT) in one or more dimensions, of arbitrary input
+ size, and of both real and complex data (as well as of even/odd
+ data, i.e. the discrete cosine/sine transforms or DCT/DST). We
+ believe that FFTW, which is free software, should become the FFT
+ library of choice for most applications."""
+
+ homepage = "http://www.fftw.org"
+ url = "http://www.fftw.org/fftw-3.3.4.tar.gz"
+ list_url = "http://www.fftw.org/download.html"
+
+ version('3.3.8', sha256='6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303')
+ version('3.3.7', sha256='3b609b7feba5230e8f6dd8d245ddbefac324c5a6ae4186947670d9ac2cd25573')
+ version('3.3.6-pl2', sha256='a5de35c5c824a78a058ca54278c706cdf3d4abba1c56b63531c2cb05f5d57da2')
+ version('3.3.5', sha256='8ecfe1b04732ec3f5b7d279fdb8efcad536d555f9d1e8fabd027037d45ea8bcf')
+ version('3.3.4', sha256='8f0cde90929bc05587c3368d2f15cd0530a60b8a9912a8e2979a72dbe5af0982')
+ version('2.1.5', sha256='f8057fae1c7df8b99116783ef3e94a6a44518d49c72e2e630c24b689c6022630')
+
+ variant(
+ 'pfft_patches', default=False,
+ description='Add extra transpose functions for PFFT compatibility')
+
+ depends_on('automake', type='build', when='+pfft_patches')
+ depends_on('autoconf', type='build', when='+pfft_patches')
+ depends_on('libtool', type='build', when='+pfft_patches')
+
+ provides('fftw-api@2', when='@2.1.5')
+ provides('fftw-api@3', when='@3:')
+
+ patch('pfft-3.3.5.patch', when="@3.3.5:+pfft_patches", level=0)
+ patch('pfft-3.3.4.patch', when="@3.3.4+pfft_patches", level=0)
+ patch('pgi-3.3.6-pl2.patch', when="@3.3.6-pl2%pgi", level=0)
+ patch('intel-configure.patch', when="@3:3.3.8%intel", level=0)