File SpFFT.spec of Package SpFFT

#
# spec file for package SpFFT
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:	SpFFT
Version:	0
Release:	0
%define         sover 1
Summary: Sparse 3D FFT library with MPI, OpenMP, CUDA and ROCm support
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:	BSD-3-Clause
URL:	https://github.com/electronic-structure/SIRIUS
Source:	_service


BuildRequires:	openmpi5-macros-devel
BuildRequires:	cmake
BuildRequires:	gcc-c++
BuildRequires:	gcc-fortran

BuildRequires:	gsl-devel

BuildRequires:	libxc-devel

BuildRequires:	fftw3-openmp-devel

BuildRequires:	libopenblas_openmp-devel
BuildRequires:	blacs-openmpi5-devel
BuildRequires:	libscalapack2-openmpi5-devel

BuildRequires:	hdf5-openmpi5-devel




%description
SpFFT - 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.

%package -n libSpFFT-%sover
Summary:        Main libint library v2
Group:          System/Libraries
%openmpi_requires
%description -n libSpFFT-%sover
SpFFT - 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.

%package devel
Summary:        Development headers and libraries for libint
Group:          Development/Libraries/C and C++
Requires:       eigen3-devel
Requires:       libSpFFT-%sover = %{version}

%description devel
SpFFT - 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.
%prep
%setup -q -n %_sourcedir/%name-%version -T -D
%__mkdir -p %_builddir/%_sourcedir
%__ln -rs %_sourcedir/%name-%version %_builddir/%_sourcedir

%build
%setup_openmpi
export CXX=mpicxx CC=mpicc FC=mpif90
%cmake  -DSPFFT_OMP=ON -DSPFFT_MPI=ON \
-DSPFFT_GPU_BACKEND=OFF \
-DSPFFT_FORTRAN=ON \
SPFFT_BUNDLED_LIBS=OFF \
-DSPFFT_SINGLE_PRECISION=OFF \
-DCMAKE_INSTALL_PREFIX:PATH=%openmpi_prefix

%cmake_build

%install
%cmake_install

%files
%license LICENSE
%doc README.md


%files -n libSpFFT-%sover
%dir %openmpi_prefix
%openmpi_prefix/%{_lib}/libspfft.so.*
%dir %openmpi_prefix/%{_lib}
%dir %openmpi_prefix
%files devel
%dir %openmpi_prefix/%{_lib}
%dir %openmpi_prefix/include

%dir %openmpi_prefix/%{_lib}/cmake/
%openmpi_prefix/%{_lib}/libspfft.so
%openmpi_prefix/%{_lib}/cmake/%{name}/
%openmpi_prefix/include/spfft
%openmpi_prefix/%{_lib}/pkgconfig/%{name}.pc
%changelog

openSUSE Build Service is sponsored by