summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMiroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com>2020-10-02 14:13:44 -0400
committerGitHub <noreply@github.com>2020-10-02 20:13:44 +0200
commit1ad405d649fc7bb9fa6475363544aed109f7999f (patch)
tree77ae8765673ced098258fdcab716a472f763f72d /var
parentc71c509f058daf09330756e92343467f82f3f7a9 (diff)
downloadspack-1ad405d649fc7bb9fa6475363544aed109f7999f.tar.gz
spack-1ad405d649fc7bb9fa6475363544aed109f7999f.tar.bz2
spack-1ad405d649fc7bb9fa6475363544aed109f7999f.tar.xz
spack-1ad405d649fc7bb9fa6475363544aed109f7999f.zip
heffte: added v2.0.0 with Python an Fortran bindings (#19129)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/heffte/fortran200.patch13
-rw-r--r--var/spack/repos/builtin/packages/heffte/package.py14
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/heffte/fortran200.patch b/var/spack/repos/builtin/packages/heffte/fortran200.patch
new file mode 100644
index 0000000000..564f12492d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/heffte/fortran200.patch
@@ -0,0 +1,13 @@
+diff --git a/fortran/test_mixed.f90 b/fortran/test_mixed.f90
+index 69424a8..b65d758 100644
+--- a/fortran/test_mixed.f90
++++ b/fortran/test_mixed.f90
+@@ -37,7 +37,7 @@ allocate(output(fft_cpu%size_outbox()))
+
+ do i = 1, fft_cpu%size_inbox()
+ input(i) = i
+-endif
++enddo
+
+ call fft_cpu%forward(input, output, scale_fftw_symmetric)
+
diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py
index 0caabab239..80b7e65485 100644
--- a/var/spack/repos/builtin/packages/heffte/package.py
+++ b/var/spack/repos/builtin/packages/heffte/package.py
@@ -16,22 +16,34 @@ class Heffte(CMakePackage):
maintainers = ['mkstoyanov']
version('develop', branch='master')
+ version('2.0.0', sha256='12f2b49a1a36c416eac174cf0cc50e729d56d68a9f68886d8c34bd45a0be26b6')
version('1.0', sha256='0902479fb5b1bad01438ca0a72efd577a3529c3d8bad0028f3c18d3a4935ca74')
version('0.2', sha256='4e76ae60982b316c2e873b2e5735669b22620fefa1fc82f325cdb6989bec78d1')
version('0.1', sha256='d279a03298d2dc76574b1ae1031acb4ea964348cf359273d1afa4668b5bfe748')
patch('threads10.patch', when='@1.0')
+ patch('fortran200.patch', when='@2.0.0')
variant('shared', default=True, description='Builds with shared libraries')
variant('fftw', default=False, description='Builds with support for FFTW backend')
variant('mkl', default=False, description='Builds with support for MKL backend')
variant('cuda', default=False, description='Builds with support for GPUs via CUDA')
variant('magma', default=False, description='Use helper methods from the UTK MAGMA library')
+ variant('python', default=False, description='Install the Python bindings')
+ variant('fortran', default=False, description='Install the Fortran modules')
+
+ depends_on('python@3.0:', when='+python', type=('build', 'run'))
+ depends_on('py-mpi4py', when='+python', type=('build', 'run'))
+ depends_on('py-numpy', when='+python', type=('build', 'run'))
+ depends_on('py-numba', when='+python+cuda', type=('build', 'run'))
+ extends('python', when='+python', type=('build', 'run'))
conflicts('~fftw', when='~mkl~cuda') # requires at least one backend
conflicts('+fftw', when='+mkl@:1.0') # old API supports at most one CPU backend
conflicts('openmpi~cuda', when='+cuda') # +cuda requires CUDA enabled OpenMPI
conflicts('~cuda', when='+magma') # magma requires CUDA or HIP
+ conflicts('+python', when="@:1.0") # python support was added post v1.0
+ conflicts('+fortran', when="@:1.0") # fortran support was added post v1.0
conflicts('+magma', when="@:1.0") # magma support was added post v1.0
depends_on('mpi', type=('build', 'run'))
@@ -48,6 +60,8 @@ class Heffte(CMakePackage):
self.define_from_variant('Heffte_ENABLE_FFTW', 'fftw'),
self.define_from_variant('Heffte_ENABLE_MKL', 'mkl'),
self.define_from_variant('Heffte_ENABLE_MAGMA', 'magma'),
+ self.define_from_variant('Heffte_ENABLE_FORTRAN', 'fortran'),
+ self.define_from_variant('Heffte_ENABLE_PYTHON', 'python'),
'-DBUILD_GPU={0:1s}'.format(
'ON' if ('+cuda' in self.spec and
'+fftw' in self.spec) else 'OFF'), ]