%bcond_without openmpi %bcond_without mpich %bcond_with check %global forgeurl https://github.com/pghysels/STRUMPACK %global date 20230620 %global commit bb3bb81c3de5227a2ddd7ce5eef7f03fa828e3fe %global shortcommit %(c=%{commit}; echo ${c:0:7}) %forgemeta Name: strumpack Version: 7.1.3 Release: %autorelease Summary: Structured Matrix Package (LBNL) License: BSD-3-Caluse URL: %{forgeurl} Source0: %{forgesource} Patch0: https://github.com/topazus/STRUMPACK/commit/b93112deb644cdaa5c124ee9fa32dd62af28dbe5.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: gcc-c++ BuildRequires: gcc-gfortran BuildRequires: cmake BuildRequires: ninja-build BuildRequires: metis-devel BuildRequires: flexiblas-devel BuildRequires: zfp-devel %description STRUMPACK - STRUctured Matrix PACKage - is a software library providing linear algebra routines and linear system solvers for sparse and for dense rank-structured linear systems. Many large dense matrices are rank structured, meaning they exhibit some kind of low-rank property, for instance in hierarchically defined sub-blocks. In sparse direct solvers based on LU factorization, the LU factors can often also be approximated well using rank-structured matrix compression, leading to robust preconditioners. The sparse solver in STRUMPACK can also be used as an exact direct solver, in which case it functions similarly as for instance SuperLU or superlu_dist. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %if %{with openmpi} %package openmpi Summary: OpenMPI version of %{name} BuildRequires: openmpi-devel BuildRequires: scalapack-openmpi-devel BuildRequires: ptscotch-openmpi-devel %description openmpi This package contains the %{name} library compiled against OpenMPI. %package openmpi-devel Summary: development files for %{name} with OpenMPI version of %{name} Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-devel This package contains the %{name} development library compiled against OpenMPI. %endif %if %{with mpich} %package mpich Summary: MPICH version of %{name} BuildRequires: mpich-devel BuildRequires: scalapack-mpich-devel BuildRequires: ptscotch-mpich-devel Requires: mpich-%{?_isa} %description mpich This package contains the %{name} library compiled against MPICH. %package mpich-devel Summary: mpich development libraries for MPICH version of %{name} Requires: %{name}-mpich%{?_isa} = %{version}-%{release} Requires: mpich-devel%{?_isa} %description mpich-devel This package contains the %{name} development library compiled against MPICH. %endif %prep %forgeautosetup -p1 %build OPTIONS=( -GNinja \ -DCMAKE_BUILD_TYPE=Release \ ) %global _vpath_builddir %{_target_platform} %cmake \ ${OPTIONS[@]} \ -DSTRUMPACK_USE_MPI=OFF \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/STRUMPACK \ %cmake_build %if %{with openmpi} %{_openmpi_load} %global _vpath_builddir %{_target_platform}-openmpi %cmake \ ${OPTIONS[@]} \ -DSTRUMPACK_USE_MPI=ON \ -DTPL_SCALAPACK_LIBRARIES=${MPI_LIB}/libscalapack.so \ -DCMAKE_INSTALL_LIBDIR=${MPI_LIB} \ -DCMAKE_INSTALL_INCLUDEDIR=${MPI_INCLUDE}/STRUMPACK \ %cmake_build %{_openmpi_unload} %endif %if %{with mpich} %{_mpich_load} %global _vpath_builddir %{_target_platform}-mpich %cmake \ ${OPTIONS[@]} \ -DSTRUMPACK_USE_MPI=ON \ -DTPL_SCALAPACK_LIBRARIES=${MPI_LIB}/libscalapack.so \ -DCMAKE_INSTALL_LIBDIR=${MPI_LIB} \ -DCMAKE_INSTALL_INCLUDEDIR=${MPI_INCLUDE}/STRUMPACK \ %cmake_build %{_mpich_unload} %endif %install %global _vpath_builddir %{_target_platform} %cmake_install %if %{with openmpi} %{_openmpi_load} %global _vpath_builddir %{_target_platform}-openmpi %cmake_install %{_openmpi_unload} %endif %if %{with mpich} %{_mpich_load} %global _vpath_builddir %{_target_platform}-mpich %cmake_install %{_mpich_unload} %endif %files %license LICENSE %doc README.md %{_libdir}/libstrumpack.so.7* %files devel %{_libdir}/libstrumpack.so %dir %{_includedir}/STRUMPACK %{_includedir}/STRUMPACK/*.{h,hpp} %{_includedir}/STRUMPACK/BLR/ %{_includedir}/STRUMPACK/HODLR/ %{_includedir}/STRUMPACK/HSS/ %{_includedir}/STRUMPACK/clustering/ %{_includedir}/STRUMPACK/dense/ %{_includedir}/STRUMPACK/iterative/ %{_includedir}/STRUMPACK/kernel/ %{_includedir}/STRUMPACK/misc/ %{_includedir}/STRUMPACK/python/ %{_includedir}/STRUMPACK/sparse/ %{_includedir}/STRUMPACK/structured/ %{_includedir}/STRUMPACK/strumpack*.mod %{_libdir}/cmake/STRUMPACK/ %if %{with openmpi} %files openmpi %license LICENSE %doc README.md %{_libdir}/openmpi/lib/libstrumpack.so.7* %files openmpi-devel %{_libdir}/openmpi/lib/libstrumpack.so %dir %{_includedir}/openmpi-%{_arch}/STRUMPACK %{_includedir}/openmpi-%{_arch}/STRUMPACK/BLR/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/HODLR/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/HSS/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/*.{h,hpp} %{_includedir}/openmpi-%{_arch}/STRUMPACK/clustering/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/dense/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/iterative/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/kernel/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/misc/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/python/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/sparse/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/structured/ %{_includedir}/openmpi-%{_arch}/STRUMPACK/strumpack*.mod %{_libdir}/openmpi/lib/cmake/STRUMPACK/ %endif %if %{with mpich} %files mpich %license LICENSE %doc README.md %{_libdir}/mpich/lib/libstrumpack.so.7* %files mpich-devel %{_libdir}/mpich/lib/libstrumpack.so %dir %{_includedir}/mpich-%{_arch}/STRUMPACK %{_includedir}/mpich-%{_arch}/STRUMPACK/BLR/ %{_includedir}/mpich-%{_arch}/STRUMPACK/HODLR/ %{_includedir}/mpich-%{_arch}/STRUMPACK/HSS/ %{_includedir}/mpich-%{_arch}/STRUMPACK/*.{h,hpp} %{_includedir}/mpich-%{_arch}/STRUMPACK/clustering/ %{_includedir}/mpich-%{_arch}/STRUMPACK/dense/ %{_includedir}/mpich-%{_arch}/STRUMPACK/iterative/ %{_includedir}/mpich-%{_arch}/STRUMPACK/kernel/ %{_includedir}/mpich-%{_arch}/STRUMPACK/misc/ %{_includedir}/mpich-%{_arch}/STRUMPACK/python/ %{_includedir}/mpich-%{_arch}/STRUMPACK/sparse/ %{_includedir}/mpich-%{_arch}/STRUMPACK/structured/ %{_includedir}/mpich-%{_arch}/STRUMPACK/strumpack*.mod %{_libdir}/mpich/lib/cmake/STRUMPACK/ %endif %changelog %autochangelog