diff options
author | Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> | 2020-06-15 23:44:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 05:44:47 +0200 |
commit | 32558525f6324b75f30cdc415ef0b996b47bed76 (patch) | |
tree | 8c3879b5505ce0c595a72ab6f243072b5e11f889 | |
parent | cb028aaf12df15127339fa752108fc860a5c3dbf (diff) | |
download | spack-32558525f6324b75f30cdc415ef0b996b47bed76.tar.gz spack-32558525f6324b75f30cdc415ef0b996b47bed76.tar.bz2 spack-32558525f6324b75f30cdc415ef0b996b47bed76.tar.xz spack-32558525f6324b75f30cdc415ef0b996b47bed76.zip |
heffte: added v1.0 (#17102)
-rw-r--r-- | var/spack/repos/builtin/packages/heffte/package.py | 42 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/heffte/threads10.patch | 13 |
2 files changed, 44 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index 4a3fec0f33..45f9b1ee8c 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -10,23 +10,43 @@ class Heffte(CMakePackage): """Highly Efficient FFT for Exascale""" homepage = "https://bitbucket.org/icl/heffte" - url = "https://bitbucket.org/icl/heffte/get/v0.1.tar.gz" + url = "https://bitbucket.org/icl/heffte/get/v1.0.tar.gz" git = "https://bitbucket.org/icl/heffte.git" - version('master', branch='master') + maintainers = ['mkstoyanov'] + + version('develop', branch='master') + version('1.0', sha256='0902479fb5b1bad01438ca0a72efd577a3529c3d8bad0028f3c18d3a4935ca74') version('0.2', sha256='4e76ae60982b316c2e873b2e5735669b22620fefa1fc82f325cdb6989bec78d1') version('0.1', sha256='d279a03298d2dc76574b1ae1031acb4ea964348cf359273d1afa4668b5bfe748') + patch('threads10.patch', when='@1.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') - depends_on('fftw') - depends_on('mpi') - depends_on('cuda', when="+cuda") + conflicts('~fftw', when='~mkl~cuda') # requires at least one backend + conflicts('+fftw', when='+mkl') # old API supports at most one CPU backend + conflicts('openmpi~cuda', when='+cuda') # +cuda requires CUDA enabled OpenMPI + + depends_on('mpi', type=('build', 'run')) + + depends_on('fftw@3.3.8:', when="+fftw", type=('build', 'run')) + depends_on('intel@16.0:', when="+mkl", type=('build', 'run')) + depends_on('cuda@8.0:', when="+cuda", type=('build', 'run')) def cmake_args(self): - args = ['-DBUILD_SHARED=ON'] - if '+cuda' in self.spec: - args.append('-DBUILD_GPU=ON') - else: - args.append('-DBUILD_GPU=OFF') - return args + return [ + '-DBUILD_SHARED_LIBS={0:1s}'.format( + 'ON' if '+shared' in self.spec else 'OFF'), + '-DBUILD_GPU={0:1s}'.format( + 'ON' if ('+cuda' in self.spec and + '+fftw' in self.spec) else 'OFF'), + '-DHeffte_ENABLE_CUDA={0:1s}'.format( + 'ON' if '+cuda' in self.spec else 'OFF'), + '-DHeffte_ENABLE_FFTW={0:1s}'.format( + 'ON' if '+fftw' in self.spec else 'OFF'), + '-DHeffte_ENABLE_MKL={0:1s}'.format( + 'ON' if '+mkl' in self.spec else 'OFF'), ] diff --git a/var/spack/repos/builtin/packages/heffte/threads10.patch b/var/spack/repos/builtin/packages/heffte/threads10.patch new file mode 100644 index 0000000000..41d55d9bb8 --- /dev/null +++ b/var/spack/repos/builtin/packages/heffte/threads10.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/HeffteConfig.cmake b/cmake/HeffteConfig.cmake +index bd67de9..ca06086 100644 +--- a/cmake/HeffteConfig.cmake ++++ b/cmake/HeffteConfig.cmake +@@ -19,6 +19,8 @@ if (NOT TARGET MPI::MPI_CXX) + find_package(MPI REQUIRED) + endif() + ++find_package(Threads) ++ + if ("@BUILD_SHARED_LIBS@") + set(Heffte_SHARED_FOUND "ON") + else() |