## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: SpFFT Version: 1.1.0 Release: %autorelease Summary: Sparse 3D FFT library License: BSD-3-Clause URL: https://github.com/eth-cscs/SpFFT Source: %{URL}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: fftw3-devel BuildRequires: gcc-c++ BuildRequires: gcc-gfortran BuildRequires: gmock-devel BuildRequires: gtest-devel BuildRequires: pkgconf %global _description %{expand: A 3D FFT library for sparse frequency domain data written in C++ with support for MPI, OpenMP, CUDA and ROCm. Inspired by the need of some computational material science applications with spherical cutoff data in frequency domain, SpFFT provides Fast Fourier Transformations of sparse frequency domain data. For distributed computations with MPI, slab decomposition in space domain and pencil decomposition in frequency domain (sparse data within a pencil / column must be on one rank) is used. ### Design Goals - Sparse frequency domain input - Reuse of pre-allocated memory - Support for shifted indexing with centered zero-frequency - Optional parallelization and GPU acceleration - Unified interface for calculations on CPUs and GPUs - Support of Complex-To-Real and Real-To-Complex transforms, where the full hermitian symmetry property is utilized - C++, C and Fortran interfaces ### Interface Design To allow for pre-allocation and reuse of memory, the design is based on two classes: - **Grid**: Provides memory for transforms up to a given size. - **Transform**: Created with information on sparse input data and is associated with a *Grid*. Maximum size is limited by *Grid* dimensions. Internal reference counting to *Grid* objects guarantee a valid state until *Transform* object destruction. A transform can be computed in-place and out-of-place. Addtionally, an internally allocated work buffer can optionally be used for input / output of space domain data.} %description %_description %package devel Summary: Development files for SpFFT Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development header files for SpFFT. %package openmpi Summary: SpFFT - openmpi version BuildRequires: openmpi-devel %description openmpi %_description This package contains the parallel single- and multi-threaded versions using OpenMPI. %package openmpi-devel Summary: Development files for %{name}-openmpi Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-devel Development and header files for SpFFT built with OpenMPI. %package mpich Summary: SpFFT - mpich version BuildRequires: mpich-devel %description mpich %_description This package contains the parallel single- and multi-threaded versions using mpich. %package mpich-devel Summary: Development files for %{name}-mpich Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-devel Development and header files for SpFFT built with mpich. %prep # Need to create separate build directories for each build %autosetup -c -n %{name}-%{version} -N # Need to create separate build directories for each build for mpi in %{mpi_list} do cp -a -p %{name}-%{version} %{name}-%{version}-$mpi done %build pushd %{name}-%{version} %cmake -DSPFFT_STATIC=OFF \ -DSPFFT_OMP=ON \ -DSPFFT_MPI=OFF \ -DSPFFT_SINGLE_PRECISION=OFF \ -DSPFFT_BUILD_TESTS=ON \ -DSPFFT_FORTRAN=ON \ -DSPFFT_BUNDLED_LIBS=OFF \ -DSPFFT_INSTALL=ON \ -DCMAKE_PREFIX_PATH=%{_prefix} \ %cmake_build popd for mpi in %{mpi_list} do module load mpi/$mpi-%{_arch} pushd %{name}-%{version}-$mpi %cmake -DSPFFT_STATIC=OFF \ -DSPFFT_OMP=ON \ -DSPFFT_MPI=ON \ -DSPFFT_SINGLE_PRECISION=OFF \ -DSPFFT_BUILD_TESTS=ON \ -DSPFFT_FORTRAN=ON \ -DSPFFT_BUNDLED_LIBS=OFF \ -DSPFFT_INSTALL=ON \ -DCMAKE_PREFIX_PATH=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR=${MPI_LIB:-%{_libdir}} \ -DCMAKE_INSTALL_INCLUDEDIR=${MPI_INCLUDE:-%{_includedir}} %cmake_build popd module purge done %install pushd %{name}-%{version} %cmake_install popd popd for mpi in %{mpi_list} do module load mpi/$mpi-%{_arch} pushd %{name}-%{version}-$mpi %cmake_install popd module purge done %check pushd %{name}-%{version} tests/run_local_tests popd for mpi in %{mpi_list} do module load mpi/$mpi-%{_arch} pushd %{name}-%{version}-$mpi mpirun -n 2 tests/run_mpi_tests popd module purge done %files %license LICENSE %doc README.md %{_libdir}/libspfft.so.1.1.0 %files devel %dir %{_includedir}/spfft %{_includedir}/spfft/*.h %{_pkconfigdir}/SpFFT.pc %{_libdir}/libspfft.so %{_libdir}/libspfft.so.1 %{_libdir}/cmake/SpFFT/*.cmake %{_libdir}/cmake/SpFFT/modules/*.cmake %files openmpi %license LICENSE %doc README.md %{_libdir}/openmpi*/lib/libspfft.so.1.1.0 %files openmpi-devel %dir %{_includedir}/openmpi*/spfft %{_includedir}/openmpi*/spfft/*.h %{_libdir}/openmpi*/lib/pkgconfig/SpFFT.pc %{_libdir}/openmpi*/lib/libspfft.so %{_libdir}/openmpi*/lib/libspfft.so.1 %{_libdir}/openmpi*/lib/cmake/SpFFT/*.cmake %{_libdir}/openmpi*/lib/cmake/SpFFT/modules/*.cmake %files mpich %license LICENSE %doc README.md %{_libdir}/mpich*/lib/libspfft.so.1.1.0 %files mpich-devel %dir %{_includedir}/mpich*/spfft %{_includedir}/mpich*/spfft/*.h %{_libdir}/mpich*/lib/pkgconfig/SpFFT.pc %{_libdir}/mpich*/lib/libspfft.so %{_libdir}/mpich*/lib/libspfft.so.1 %{_libdir}/mpich*/lib/cmake/SpFFT/*.cmake %{_libdir}/mpich*/lib/cmake/SpFFT/modules/*.cmake %changelog ## START: Generated by rpmautospec * Sat Nov 23 2024 John Doe - 1.1.0-1 - Uncommitted changes ## END: Generated by rpmautospec