Name: heffte Version: 2.4.1 %global sover 2 Release: 1%{?dist} Summary: Highly Efficient FFT for Exascale License: BSD-3-Clause URL: https://icl.utk.edu/fft/ Source0: https://github.com/icl-utk-edu/heffte/archive/v%{version}/%{name}-%{version}.tar.gz # no openmpi on ix86 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval # mpi is broken on s390x see, bug #2322073 ExcludeArch: %{ix86} s390x BuildRequires: gcc-c++ BuildRequires: gcc-fortran BuildRequires: cmake >= 3.16 BuildRequires: doxygen BuildRequires: openmpi-devel BuildRequires: mpich-devel BuildRequires: fftw-devel BuildRequires: environment-modules %global heffte_desc \ The Highly Efficient FFT for Exascale (heFFTe) library is being developed \ as part of the Exascale Computing Project (ECP). HeFFTe delivers algorithms \ for distributed fast-Fourier transforms in on a heterogeneous systems, \ targeting the upcoming exascale machines. %description %{heffte_desc} %package openmpi Summary: Openmpi libraries for %{name} %description openmpi %{heffte_desc} This package contains %{name} libraries compiled with openmpi. %package openmpi-devel Summary: Openmpi development headers and libraries for %{name} Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} Requires: openmpi-devel %description openmpi-devel %{heffte_desc} This package contains openmpi development files of %{name}. %package mpich Summary: Mpich libraries for %{name} %description mpich %{heffte_desc} This package contains %{name} libraries compiled with mpich. %package mpich-devel Summary: Mpich development headers and libraries for %{name} Requires: %{name}-mpich%{?_isa} = %{version}-%{release} Requires: mpich-devel %description mpich-devel %{heffte_desc} This package contains mpich development files of %{name}. %package examples Summary: Example file for %{name} Requires: (%{name}-openmpi-devel = %{version} or %{name}-mpich-devel = %{version}) BuildArch: noarch %description examples %{heffte_desc} This package contains example files for %{name}. %package doc Summary: Documentation for %{name} Requires: (%{name}-openmpi-devel = %{version} or %{name}-mpich-devel = %{version}) BuildArch: noarch %description doc %{heffte_desc} This package contains documentation for %{name}. %prep %autosetup -p1 %build source /etc/profile.d/modules.sh mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform} export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe for mpi in mpich openmpi; do test -n "${mpi}" && module load mpi/${mpi}-%{_arch} %cmake .. \ -DHeffte_ENABLE_FFTW=ON \ -DHeffte_ENABLE_FORTRAN=ON \ -DHeffte_ENABLE_TESTING=ON \ -DHeffte_ENABLE_DOXYGEN=ON \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DHeffte_SEQUENTIAL_TESTING=ON \ -DCMAKE_INSTALL_LIBDIR=${MPI_LIB:-%{_libdir}} \ -DCMAKE_INSTALL_INCLUDEDIR=${MPI_INCLUDE:-%{_includedir}} \ %{nil} %make_build test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} done %install source /etc/profile.d/modules.sh for mpi in mpich openmpi; do test -n "${mpi}" && module load mpi/${mpi}-%{_arch} %make_install -C .obj-%{_target_platform} test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} done # files for testing install are not useful to package rm -rf %{buildroot}%{_datadir}/%{name}/testing %check #source /etc/profile.d/modules.sh # allow openmpi to oversubscribe, i.e. runs test with more # cores than the builder has #export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe #for mpi in mpich openmpi; do # test -n "${mpi}" && module load mpi/${mpi}-%{_arch} # cd .obj-%{_target_platform} # %ctest %{?testargs} || true # test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} #done %files openmpi %doc README.md %license LICENSE %{_libdir}/openmpi*/lib/lib%{name}*.so.%{version} %files openmpi-devel %{_includedir}/openmpi*/%{name}* %dir %{_includedir}/openmpi*/stock_fft %{_includedir}/openmpi*/stock_fft/*.h %{_libdir}/openmpi*/lib/cmake/Heffte %{_libdir}/openmpi*/lib/lib%{name}*.so %{_libdir}/openmpi*/lib/lib%{name}*.so.%{sover} %files mpich %doc README.md %license LICENSE %{_libdir}/openmpi*/lib/lib%{name}*.so.%{version} %files mpich-devel %{_includedir}/openmpi*/%{name}* %dir %{_includedir}/openmpi*/stock_fft %{_includedir}/openmpi*/stock_fft/*.h %{_libdir}/openmpi*/lib/cmake/Heffte %{_libdir}/openmpi*/lib/lib%{name}*.so %{_libdir}/openmpi*/lib/lib%{name}*.so.%{sover} %files examples %dir %{_datadir}/%{name} %{_datadir}/%{name}/examples %{_datadir}/%{name}/HeffteMakefile.in %files doc %{_datadir}/%{name}/docs %changelog * Tue Dec 12 2024 张天宇 - 2.4.1-1 - Initial package