summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSimon Pintarelli <1237199+simonpintarelli@users.noreply.github.com>2019-10-29 04:57:07 +0100
committerAdam J. Stewart <ajstewart426@gmail.com>2019-10-28 22:57:07 -0500
commitaad8ea172c404b533ab011e60c0e878cc48883f1 (patch)
treea79f72792e9329cabc116ebc0f46e4daa8ffee07 /var
parentbc930f310f0511955956b497bf96689b5f4f0ebe (diff)
downloadspack-aad8ea172c404b533ab011e60c0e878cc48883f1.tar.gz
spack-aad8ea172c404b533ab011e60c0e878cc48883f1.tar.bz2
spack-aad8ea172c404b533ab011e60c0e878cc48883f1.tar.xz
spack-aad8ea172c404b533ab011e60c0e878cc48883f1.zip
Add SpFFT: sparse 3D FFT library (#13458)
* Add SpFFT: sparse 3D FFT library SpFFT is required as a dependency for SIRIUS * cleanup * add missing dependency
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/spfft/package.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/spfft/package.py b/var/spack/repos/builtin/packages/spfft/package.py
new file mode 100644
index 0000000000..703a1a1674
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spfft/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+from spack import *
+
+
+class Spfft(CMakePackage):
+ """Sparse 3D FFT library with MPI, OpenMP, CUDA and ROCm support."""
+
+ homepage = "https://github.com/eth-cscs/SpFFT"
+ url = "https://github.com/eth-cscs/SpFFT/archive/v0.9.8.zip"
+
+ version('0.9.8', sha256='f49fa51316bbfa68309e951d2375e1f6904120c93868cbe13bc2974c0b801a3f')
+
+ variant('openmp', default=True, description="Build with OpenMP support")
+ variant('mpi', default=True, description="enable MPI")
+ variant('single_precision', default=False, description="Sinlge precision")
+ variant('gpu_direct', default=False, description="GPU aware MPI")
+ variant('static', default=False, description="build static library")
+ variant('cuda', default=False, description="CUDA")
+ variant('build_type', default='Release', description='CMake build type',
+ values=('Debug', 'Release', 'RelWithDebInfo'))
+ depends_on('fftw')
+ depends_on('mpi', when='+mpi')
+ depends_on('cuda', when='+cuda')
+
+ def cmake_args(self):
+ args = []
+ if self.spec.satisfies('+openmp'):
+ args += ["-DSPFFT_OMP=On"]
+ if self.spec.satisfies('+mpi'):
+ args += ["-DSPFFT_MPI=On"]
+ if self.spec.satisfies('+single_precision'):
+ args += ["-DSPFFT_SINGLE_PRECISION=On"]
+ if self.spec.satisfies('+gpu_direct'):
+ args += ["-DSPFFT_GPU_DIRECT=On"]
+ if self.spec.satisfies('+cuda'):
+ args += ["-DSPFFT_BACKEND=CUDA"]
+ if self.spec.satisfies('+cuda'):
+ args += ["-DSPFFT_BACKEND=CUDA"]
+ return args