# Copyright (c) 2014 Dave Love, University of Liverpool # Copyright (c) 2018 Dave Love, University of Manchester # MIT licence, per Fedora policy %if 0%{?fedora} >= 40 %ifarch %{ix86} %bcond_with openmpi %else %bcond_without openmpi %endif %else %bcond_without openmpi %endif %bcond_without mpich %bcond_without check %bcond_without flexiblas %if %{with flexiblas} %global blaslib flexiblas %else %global blaslib openblas %endif %global somajor 2 %global soversion %{somajor}.1 %undefine _ld_as_needed # No sphinx in el8 as of 2019-09, and missing latex packages %{!?el8:%global docs 1} Name: hypre Version: 2.24.0 Release: 17%{?dist} Summary: High performance matrix preconditioners License: Apache-2.0 OR MIT URL: http://www.llnl.gov/casc/hypre/ Source: https://github.com/hypre-space/hypre/archive/v%version/%{name}-%{version}.tar.gz # Don't use hostname for tests and use two MPI processes Patch2: hypre-test.patch #https://patch-diff.githubusercontent.com/raw/hypre-space/hypre/pull/1156.patch Patch3: hypre-2.24.0_request_156.patch BuildRequires: gcc-c++ BuildRequires: gcc-gfortran BuildRequires: cmake BuildRequires: chrpath BuildRequires: SuperLU-devel BuildRequires: %{blaslib}-devel %if 0%{?docs} BuildRequires: doxygen-latex BuildRequires: python-sphinx BuildRequires: python-sphinx-theme-alabaster BuildRequires: python3-breathe BuildRequires: python3-sphinx-latex BuildRequires: /usr/bin/latexmk BuildRequires: tex(threeparttable.sty) BuildRequires: tex(hanging.sty) BuildRequires: tex(adjustbox.sty) BuildRequires: tex(fncychap.sty) BuildRequires: tex(tabulary.sty) BuildRequires: tex(capt-of.sty) BuildRequires: tex(needspace.sty) BuildRequires: tex(stackengine.sty) BuildRequires: tex(listofitems.sty) BuildRequires: tex(ulem.sty) BuildRequires: tex(etoc.sty) %endif %global desc \ Hypre is a set of matrix preconditioning libraries to aid in the\ solution of large systems of linear equations. %description %desc %package devel Summary: Development files for %name Requires: %{name}%{?_isa} = %{version}-%{release} Requires: SuperLU-devel%{?_isa} Requires: %{blaslib}-devel%{?_isa} %description devel Development files for %name %if %{with openmpi} %package openmpi Summary: High performance matrix preconditioners - openmpi BuildRequires: superlu_dist-openmpi-devel BuildRequires: ptscotch-openmpi-devel %description openmpi %desc This is the openmpi version. %package openmpi-devel Summary: Development files for %name-openmpi Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} Requires: superlu_dist-openmpi-devel%{?_isa} Requires: ptscotch-openmpi-devel%{?_isa} Requires: %{blaslib}-devel%{?_isa} %description openmpi-devel Development files for %name-openmpi %endif %if %{with mpich} %package mpich Summary: High performance matrix preconditioners - mpich BuildRequires: superlu_dist-mpich-devel ptscotch-mpich-devel %description mpich %desc This is the mpich version. %package mpich-devel Summary: Development files for %name-mpich Requires: %{name}-mpich%{?_isa} = %{version}-%{release} Requires: superlu_dist-mpich-devel%{?_isa} Requires: ptscotch-mpich-devel%{?_isa} Requires: %{blaslib}-devel%{?_isa} %description mpich-devel Development files for %name-mpich %endif %if 0%{?docs} %package doc Summary: Documentation for hypre BuildArch: noarch %description doc Documentation for hypre %endif %prep %setup -q -n %name-%version %patch -P 2 -p1 -b .test %patch -P 3 -p1 -b .backup find \( -name \*.[ch] -o -name \*.cxx \) -perm /=x -exec chmod 0644 {} \; %if %{with openmpi} cp -a src openmpi %endif %if %{with mpich} cp -a src mpich %endif %build %define _vpath_builddir src/cmbuild export CFLAGS="%{optflags} -O3" export CXXFLAGS="%{optflags} -O3" export LDFLAGS="%{__global_ldflags} -L%{_libdir} $LIBS" %cmake -S src -DHYPRE_ENABLE_SHARED:BOOL=ON -DHYPRE_WITH_OPENMP:BOOL=ON \ -DHYPRE_WITH_MPI:BOOL=OFF -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DHYPRE_TIMING:BOOL=ON -DHYPRE_BUILD_EXAMPLES:BOOL=ON \ -DHYPRE_WITH_DSUPERLU:BOOL=OFF -DHYPRE_BUILD_TESTS:BOOL=ON \ -DHYPRE_INSTALL_PREFIX:PATH=%{_libdir} -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir}/hypre %cmake_build %{?docs:make html -C src/docs/usr-manual} %if %{with openmpi} %_openmpi_load %define _vpath_builddir openmpi/cmbuild export CFLAGS="%{optflags} -O3 -I$MPI_INCLUDE/scotch" export CXXFLAGS="%{optflags} -O3" export LIBS='-lsuperlu_dist -lptscotch' export LDFLAGS="%{__global_ldflags} -L$MPI_LIB $LIBS" export CC=mpicc export CXX=mpic++ %cmake -S openmpi -DHYPRE_ENABLE_SHARED:BOOL=ON -DHYPRE_WITH_OPENMP:BOOL=ON \ -DHYPRE_TIMING:BOOL=ON -DHYPRE_BUILD_EXAMPLES:BOOL=ON \ -DHYPRE_WITH_DSUPERLU:BOOL=ON -DHYPRE_BUILD_TESTS:BOOL=ON \ -DTPL_DSUPERLU_LIBRARIES:PATH=$MPI_LIB -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DTPL_DSUPERLU_INCLUDE_DIRS:PATH=$MPI_INCLUDE/superlu_dist \ -DHYPRE_INSTALL_PREFIX:PATH=$MPI_LIB -DCMAKE_INSTALL_INCLUDEDIR:PATH=$MPI_INCLUDE/hypre %cmake_build %_openmpi_unload %endif %if %{with mpich} %_mpich_load %define _vpath_builddir mpich/cmbuild export CFLAGS="%{optflags} -O3 -I$MPI_INCLUDE/scotch" export CXXFLAGS="%{optflags} -O3" export LIBS='-lsuperlu_dist -lptscotch' export LDFLAGS="%{__global_ldflags} -L$MPI_LIB $LIBS" export CC=mpicc export CXX=mpic++ %cmake -S mpich -DHYPRE_ENABLE_SHARED:BOOL=ON -DHYPRE_WITH_OPENMP:BOOL=ON \ -DHYPRE_TIMING:BOOL=ON -DHYPRE_BUILD_EXAMPLES:BOOL=ON \ -DHYPRE_WITH_DSUPERLU:BOOL=ON -DHYPRE_BUILD_TESTS:BOOL=ON \ -DTPL_DSUPERLU_LIBRARIES:PATH=$MPI_LIB -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DTPL_DSUPERLU_INCLUDE_DIRS:PATH=$MPI_INCLUDE/superlu_dist \ -DHYPRE_INSTALL_PREFIX:PATH=$MPI_LIB -DCMAKE_INSTALL_INCLUDEDIR:PATH=$MPI_INCLUDE/hypre %cmake_build %_mpich_unload %endif %check %if %{with check} %if %{with openmpi} pushd openmpi/cmbuild/test %_openmpi_load export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB ./ij ./ij_mv popd %endif %endif %install %define _vpath_builddir src/cmbuild %cmake_install mkdir -p %{buildroot}%{_bindir} install -pm 755 src/cmbuild/test/ams_driver src/cmbuild/test/ij* src/cmbuild/test/maxwell_unscaled \ src/cmbuild/test/*struct* %{buildroot}%{_bindir}/ chrpath -d %{buildroot}%{_bindir}/* %if %{with openmpi} %_openmpi_load %define _vpath_builddir openmpi/cmbuild %cmake_install mkdir -p %{buildroot}$MPI_BIN/ install -pm 755 openmpi/cmbuild/test/ams_driver openmpi/cmbuild/test/ij* openmpi/cmbuild/test/maxwell_unscaled \ openmpi/cmbuild/test/*struct* %{buildroot}$MPI_BIN/ chrpath -d %{buildroot}$MPI_BIN/* %_openmpi_unload %endif %if %{with mpich} %_mpich_load %define _vpath_builddir mpich/cmbuild %cmake_install mkdir -p %{buildroot}$MPI_BIN/ install -pm 755 mpich/cmbuild/test/ams_driver mpich/cmbuild/test/ij* mpich/cmbuild/test/maxwell_unscaled \ mpich/cmbuild/test/*struct* %{buildroot}$MPI_BIN/ chrpath -d %{buildroot}$MPI_BIN/* %_mpich_unload %endif %files %doc CHANGELOG README.md %license COPYRIGHT LICENSE-* %{_libdir}/libHYPRE.so.%{somajor}* %files devel %{_bindir}/* %{_libdir}/libHYPRE.so %{_includedir}/%{name} %{_libdir}/cmake/HYPRE/ %if %{with openmpi} %files openmpi %doc CHANGELOG README.md %license COPYRIGHT LICENSE-* %{_libdir}/openmpi/lib/libHYPRE.so.%{somajor}* %files openmpi-devel %{_libdir}/openmpi/bin/* %{_libdir}/openmpi/lib/libHYPRE.so %{_libdir}/openmpi/lib/cmake/HYPRE/ %{_includedir}/openmpi-%_arch/%{name} %endif %if %{with mpich} %files mpich %doc CHANGELOG README.md %license COPYRIGHT LICENSE-* %{_libdir}/mpich/lib/libHYPRE.so.%{somajor}* %files mpich-devel %{_libdir}/mpich/bin/* %{_libdir}/mpich/lib/libHYPRE.so %{_libdir}/mpich/lib/cmake/HYPRE/ %{_includedir}/mpich-%_arch/%{name} %endif %if 0%{?docs} %files doc %doc CHANGELOG README.md src/examples %license COPYRIGHT LICENSE-* %doc src/docs/usr-manual/_build %endif %changelog * Sun Oct 06 2024 Antonio Trande - 2.24.0-17 - Switch to CMake method * Thu Sep 05 2024 Antonio Trande - 2.24.0-16 - Rebuild for SuperLU-7.0.0 * Fri Aug 16 2024 Sandro Mani - 2.24.0-15 - Rebuild (scoch-7.0.4) * Thu Jul 18 2024 Fedora Release Engineering - 2.24.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Apr 05 2024 Antonio Trande - 2.24.0-13 - Rebuild in EPEL9 * Sat Mar 16 2024 Dave Love - 2.24.0-12 - Fix licence (changed from LGPL to Apache 2 or MIT) * Wed Jan 24 2024 Fedora Release Engineering - 2.24.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 20 2024 Fedora Release Engineering - 2.24.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Dec 15 2023 Antonio Trande - 2.24.0-9 - Rebuild for superlu_dist-8.2.0 * Thu Aug 17 2023 Antonio Trande - 2.24.0-8 - Rebuild for Scotch-7.0.4 * Thu Jul 20 2023 Fedora Release Engineering - 2.24.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sun Jul 16 2023 Antonio Trande - 2.24.0-6 - Rebuild for SuperLU-6.0.0 * Thu Apr 13 2023 Antonio Trande - 2.24.0-5 - Rebuild for Scotch-7 * Thu Jan 19 2023 Fedora Release Engineering - 2.24.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jul 21 2022 Fedora Release Engineering - 2.24.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jun 24 2022 Antonio Trande - 2.24.0-2 - Rebuild for superlu_dist-8.0.0 * Sat Apr 02 2022 Antonio Trande - 2.24.0-1 - Release 2.24.0 * Thu Jan 20 2022 Fedora Release Engineering - 2.18.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sat Oct 30 2021 Antonio Trande - 2.18.2-5 - Rebuild for SuperLU-5.3.0 * Thu Jul 22 2021 Fedora Release Engineering - 2.18.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jan 26 2021 Fedora Release Engineering - 2.18.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Aug 13 2020 Iñaki Úcar - 2.18.2-2 - https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager * Fri Aug 7 2020 - 2.18.2-1 - Configure with CC=mpicc to fix FTBFS (#1863655) - Update to 2.18.2 * Sat Aug 01 2020 Fedora Release Engineering - 2.18.1-4 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 2.18.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jan 29 2020 Fedora Release Engineering - 2.18.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Tue Oct 15 2019 Dave love - 2.18.1-1 - New version * Tue Oct 8 2019 Dave love - 2.18.0-2 - Make libHYPRE.so.%%somajor links * Tue Oct 1 2019 Dave love - 2.18.0-1 - New version - Add minor version to soname * Wed Sep 18 2019 Dave love - 2.17.0-2 - Don't try to build docs on el8 * Mon Sep 16 2019 Dave love - 2.17.0-1 - New version, with soname bump and licence change * Sat Sep 14 2019 Dave love - 2.16.0-1 - New version from updated origin - Build docs; add BRs - Drop soname patch * Wed Sep 11 2019 Orion Poplawski - 2.15.1-7 - Drop el6 conditionals, build openmpi for EL8 * Thu Jul 25 2019 Fedora Release Engineering - 2.15.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Thu Feb 14 2019 Orion Poplawski - 2.15.1-5 - Rebuild for openmpi 3.1.3 * Fri Feb 01 2019 Fedora Release Engineering - 2.15.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Mon Dec 3 2018 Dave Love - 2.15.1-3 - Revert omitting builtin BLAS, which is namedspaced * Mon Dec 3 2018 Dave Love - 2.15.1-2 - Fix FTBFS with current superlu_dist [#1654932] - Clean up configuration and avoid builtin BLAS * Wed Nov 21 2018 Dave Love - 2.15.1-1 - New version, removing hypre_PFMGSetupInterpOp_CC0, hypre_finalize, hypre_init, which appear actually to be internal, so soname unchanged - Avoid tests * Thu Jul 19 2018 Sandro Mani - 2.14.0-4 - Rebuild (scotch) * Fri Jul 13 2018 Fedora Release Engineering - 2.14.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Apr 24 2018 Antonio Trande - 2.14.0-2 - Build hypre-openmpi on s390x (#1571450) * Fri Mar 23 2018 Dave Love - 2.14.0-1 - Update to 2.14.0 (#1557645) - Reinstate superlu and use superlu_dist * Wed Mar 07 2018 Adam Williamson - 2.13.0-6 - Rebuild to fix GCC 8 mis-compilation See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64") * Fri Feb 16 2018 Dave Love - 2.13.0-5 - Fix openblas BR (#1545197) * Wed Feb 07 2018 Fedora Release Engineering - 2.13.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Mon Nov 6 2017 Dave Love - 2.13.0-3 - Disable tests on ix86 temporarily * Sat Nov 4 2017 Dave Love - 2.13.0-3 - Revert last change in favour of updated superlu_dist * Fri Nov 3 2017 Dave Love - 2.13.0-2 - Fix link failure against parmetis * Mon Oct 30 2017 Dave Love - 2.13.0-1 - New version - Configure --with-mli for compatibility - Configure with superlu - Remove -Dhypre_dgesvd=dgesvd_ bodge - Bump soname major version (due to added elements in structs) * Wed Aug 02 2017 Fedora Release Engineering - 2.11.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 2.11.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Jul 07 2017 Igor Gnatenko - 2.11.2-2 - Rebuild due to bug in RPM (RHBZ #1468476) * Thu May 4 2017 Dave Love - 2.11.2-1 - New version * Wed Mar 15 2017 Orion Poplawski - 2.11.1-8 - Build with openblas on all available architectures * Fri Feb 10 2017 Fedora Release Engineering - 2.11.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Dec 1 2016 Dave Love - 2.11.1-6 - Conditionalize mpich-devel%%{?_isa} * Fri Oct 21 2016 Orion Poplawski - 2.11.1-5 - Rebuild for openmpi 2.0 * Fri Jul 22 2016 Dave Love - 2.11.1-4 - Ship manuals correctly * Wed Jul 20 2016 Dave Love - 2.11.1-3 - Avoid openmpi on s390 - Patch to not call hostname in test.sh and use two procs * Mon Jul 11 2016 Dave Love - 2.11.1-2 - Fix openblas conditionals * Mon Jul 11 2016 Dave Love - 2.11.1-1 - New version - Update URL - Drop previous patches -- make single library with new soversion - Adjust configure/build - Run tests - Compile with -O3 * Fri Apr 1 2016 Dave Love - 2.11.0-1 - New version - Adjust hypre-shlibs-interlink.patch and %%lalibs * Mon Dec 14 2015 Dave Love - 2.10.1-2 - Fix use of %%license for -mpich package * Tue Dec 1 2015 Dave Love - 2.10.1-1 - New version - Remove -Wl,-z,defs from configure to avoid link error (patch5) - Fix use of atlas on non-x86 - Fix %%license conditional * Sun Jul 5 2015 Dave Love - 2.9.1a-1 - New version, without babel stuff - Modify patches - Use %%license * Fri Feb 20 2015 Dave Love - 2.8.0b-16 - Conditionalize out mpich on ppc64 el6 - Use -f with libtoolize (for f22) - Fix some missing _isa in requires - Drop unnecessary configure patch - Run tests - Small simplifications * Wed Feb 4 2015 Dave Love - 2.8.0b-15 - Fix requires * Mon Dec 29 2014 Dave Love - 2.8.0b-15 - Build without internal superlu * Thu Dec 11 2014 Dave Love - 2.8.0b-14 - mpich version * Fri Nov 28 2014 Dave Love - 2.8.0b-13 - Initial packaging, following Debian, including patches High release number to avoid clash with old SuSE-based version