%bcond_without openmpi %bcond_with mpich %bcond_with check %global forgeurl https://github.com/liuyangzhuan/ButterflyPACK Version: 2.2.2 %forgemeta Name: butterflypack Release: %autorelease Summary: A mathematical software for rapidly solving large-scale dense linear systems License: LGPLv2 URL: %{forgeurl} Source0: %{forgesource} BuildRequires: gcc-c++ gcc-gfortran BuildRequires: cmake BuildRequires: ninja-build BuildRequires: flexiblas-devel %description ButterflyPACK is a mathematical software for rapidly solving large-scale dense linear systems that exhibit off-diagonal rank-deficiency. These systems arise frequently from boundary element methods, or factorization phases in finite-difference/finite-element methods. ButterflyPACK relies on low-rank or butterfly formats under Hierarchical matrix, HODLR or other hierarchically nested frameworks to compress, factor and solve the linear system in quasi-linear time. The computationally most intensive phase, factorization, is accelerated via randomized linear algebras. The butterfly format, originally inspired by the butterfly data flow in fast Fourier Transform, is a linear algebra tool well-suited for compressing matrices arising from high-frequency wave equations or highly oscillatory integral operators. ButterflyPACK also provides preconditioned TFQMR iterative solvers. ButterflyPACK is written in Fortran 2003, it also has C++ interfaces. ButterflyPACK supports hybrid MPI/OpenMP programming models. In addition, ButterflyPACK can be readily invoked from the software STRUMPACK for solving dense and sparse linear systems. %package common Summary: Common files for %{name} %description common %{summary} %if %{with openmpi} %package openmpi Summary: OpenMPI version of %{name} BuildRequires: openmpi-devel BuildRequires: scalapack-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 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 %if %{with openmpi} %{_openmpi_load} %global _vpath_builddir build-openmpi %cmake \ %cmake_build %{_openmpi_unload} %endif %if %{with mpich} %{_mpich_load} %global _vpath_builddir build-mpich %cmake \ %cmake_build %{_mpich_unload} %endif %install %if %{with openmpi} %{_openmpi_load} %global _vpath_builddir build-openmpi %cmake_install %{_openmpi_unload} %endif %if %{with mpich} %{_mpich_load} %global _vpath_builddir build-mpich %cmake_install %{_mpich_unload} %endif chrpath --delete %{buildroot}%{_libdir}/*.so chrpath --delete %{buildroot}%{_libdir}/EXAMPLE/* %files %license license.txt %doc README.md %files common %if %{with openmpi} %files openmpi %license license.txt %doc README.md %files openmpi-devel %endif %if %{with mpich} %files mpich %license license.txt %doc README.md %files mpich-devel %endif %changelog