summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNichols A. Romero <naromero77@users.noreply.github.com>2018-11-09 10:16:11 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2018-11-09 08:16:11 -0800
commit236b34f3df38d0f44ada307ece354f92a96a6a91 (patch)
treed48401c2d4ec0c864e1949259134eac9f129066c
parent988d37757f70f8e580db9091f5c9cc2e32ba33d5 (diff)
downloadspack-236b34f3df38d0f44ada307ece354f92a96a6a91.tar.gz
spack-236b34f3df38d0f44ada307ece354f92a96a6a91.tar.bz2
spack-236b34f3df38d0f44ada307ece354f92a96a6a91.tar.xz
spack-236b34f3df38d0f44ada307ece354f92a96a6a91.zip
Introduce fftw-api virtual package for Intel-MKL and FFTW (#9618)
* Introduce FFTW2 and FFT3 providers for Intel-MKL and FFTW Spack packages. * make fftw default package for fftw-api virtual package * virtual package test assertion now provides location of default virtual packages. * Change name of virtual package to fftw-api and used versioned interface.
-rw-r--r--etc/spack/defaults/packages.yaml1
-rw-r--r--lib/spack/spack/test/package_sanity.py7
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py3
-rw-r--r--var/spack/repos/builtin/packages/intel-mkl/package.py1
4 files changed, 10 insertions, 2 deletions
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml
index 5c38ddb683..aaab12b3ef 100644
--- a/etc/spack/defaults/packages.yaml
+++ b/etc/spack/defaults/packages.yaml
@@ -22,6 +22,7 @@ packages:
blas: [openblas]
daal: [intel-daal]
elf: [elfutils]
+ fftw-api: [fftw]
gl: [mesa, opengl]
glu: [mesa-glu, openglu]
golang: [gcc]
diff --git a/lib/spack/spack/test/package_sanity.py b/lib/spack/spack/test/package_sanity.py
index f31209c702..a8c84bd70d 100644
--- a/lib/spack/spack/test/package_sanity.py
+++ b/lib/spack/spack/test/package_sanity.py
@@ -47,9 +47,12 @@ def test_all_virtual_packages_have_default_providers():
defaults = spack.config.get('packages', scope='defaults')
default_providers = defaults['all']['providers']
providers = spack.repo.path.provider_index.providers
-
+ default_providers_filename = \
+ spack.config.config.scopes['defaults'].get_section_filename('packages')
for provider in providers:
- assert provider in default_providers
+ assert provider in default_providers, \
+ "all providers must have a default in %s" \
+ % default_providers_filename
def test_package_version_consistency():
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 0d424ce029..d3d8795fee 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -72,6 +72,9 @@ class Fftw(AutotoolsPackage):
# https://github.com/FFTW/fftw3/commit/902d0982522cdf6f0acd60f01f59203824e8e6f3
conflicts('%gcc@8:8.9999', when="@3.3.7")
+ provides('fftw-api@2', when='@2.1.5')
+ provides('fftw-api@3', when='@3:')
+
@property
def libs(self):
diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py
index e11b4c8e47..4b04e97d34 100644
--- a/var/spack/repos/builtin/packages/intel-mkl/package.py
+++ b/var/spack/repos/builtin/packages/intel-mkl/package.py
@@ -53,6 +53,7 @@ class IntelMkl(IntelPackage):
provides('lapack')
provides('scalapack')
provides('mkl')
+ provides('fftw-api@3', when='@2017:')
if sys.platform == 'darwin':
# there is no libmkl_gnu_thread on macOS