amgcl

C++ library for solving large sparse linear systems with algebraic multigrid method

MIT License

Downloads
299
Stars
729
Committers
20
amgcl - 1.4.4 Latest Release

Published by ddemidov 12 months ago

Minor fixes

amgcl - 1.4.3

Published by ddemidov over 2 years ago

  • Fast rebuild of the MPI AMG hierarchy in case the system matrix structure has not changed.
  • Support block valued backends with smoothed aggregation coarsening when user provides near nullspace components. This is implemented with help of hybrid backends, relaxation::as_block, and coarsening::as_scalar. See the "Using near null-space components" tutorial for more details.
  • Implement backend::reinterpret_as_rhs() helper function for easy reinterpretation of scalar vectors as block-valued.
  • Support complex types in MPI solvers.
  • Minor improvements and bug fixes.
amgcl - 1.4.2

Published by ddemidov over 3 years ago

  • Improved documentation
  • Partial rebuild of the AMG hierarchy using new matrix, and reusing
    prolongation and restriction operators.
  • Allow to use null-space vectors with MPI aggregation
  • Implemented ILUP(k). The non-zero pattern of A^k is used to determine
    the fill-in, which may be beneficial for non-symmetric systems
  • Implementation of experimental deflated solver
  • prm.solver.ns_search=true ignores trivial solution for zero RHS.
    Useful in search of the null-space vectors of the system
  • Published Docker image with compiled examples
  • Removed SIMPLE preconditioner, which may be replaced with SchurPC
  • Minor fixes and improvements.
amgcl - 1.4.0

Published by ddemidov almost 4 years ago

  • The codebase uses C++11 standard.
  • amgcl::mpi::amg preconditioner is implemented! This works much better than subdomain deflation which is now considered deprecated. See examples/mpi/mpi_amg.cpp and some benchmarks in https://doi.org/10.1134/S1995080219050056 (https://arxiv.org/abs/1811.05704).
  • Added wrappers for Scotch and ParMetis partitioning libraries.
  • Runtime interface has been refactored. Instead of doing
    typedef amgcl::make_solver<
        amgcl::runtime::amg<Backend>,
        amgcl::runtime::iterative_solver<Backend>
        > Solver;
    
    one should now
    typedef amgcl::make_solver<
        amgcl::amg<
            Backend,
            amgcl::runtime::coarsening::wrapper,
            amgcl::runtime::relaxation::wrapper
            >,
        amgcl::runtime::solver::wrapper<Backend>
        > Solver;
    
    This allows to reuse the same amgcl::amg implementation both for compile-time and runtime interfaces and greatly reduces compilation time and memory requirements for the library.
  • Got rid of as many Boost dependencies as possible in favor of C++11. Currently, only the runtime interface depends on Boost , as it uses boost::property_tree::ptree for defining runtime parameters.
    It should be possible to use the compile-time interface completely Boost-free. This also means that one should replace all uses of boost::tie and boost::make_tuple in amgcl-related code with std::tie and std::make_tuple. For example:
    Solver solve(std::tie(n, ptr, col, val));
    std::tie(iters, error) = solve(f, x);
    
  • Provide amgcl::backend::bytes() function that returns (sometimes approximately) the amount of memory allocated for an amgcl object. std::string amgcl::backend::human_readable_memory(size_t) converts bytes to a human-readable size string (e.g. 1024 is converted to 1 K).
  • Support for mixed-precision computations (where iterative solver and preconditioner use different precisions).
  • MPI versions of CPR preconditioners. Support for statically-sized matrices in global preconditioners of CPR. Support for mixed-precision in global and pressure-specific parts of CPR.
  • Helper functions for the computation of rigid body modes (for use as near null space vectors in structural problems) from 2D or 3D coordinates.
  • Improvements for the Schur pressure correction preconditioner.
  • Added Richardson and PreOnly (only apply the preconditioner once) iterative solvers. The latter is intended for use as a nested solver in composite preconditioners, such as Schur pressure correction.
  • epetra_map was moved to the adapter namespace.
  • Eigen backend was split into adapter and backend part.
  • amgcl::make_scaling_solver has been replaced with amgcl::scaled_problem adapter.
  • Added tutorials to the documentation.
  • Many bug fixes and minor improvements.
amgcl - 1.3.99

Published by ddemidov almost 5 years ago

  • The code base uses C++11 standard.
  • amgcl::mpi::amg preconditioner is implemented! This works much better than subdomain deflation which is now considered deprecated. See examples/mpi/mpi_amg.cpp and some benchmarks in https://doi.org/10.1134/S1995080219050056 (https://arxiv.org/abs/1811.05704).
  • Added wrappers for Scotch and ParMetis partitioning libraries.
  • Runtime interface has been refactored. Instead of doing
    typedef amgcl::make_solver<
        amgcl::runtime::amg<Backend>,
        amgcl::runtime::iterative_solver<Backend>
        > Solver;
    
    one should now
    typedef amgcl::make_solver<
        amgcl::amg<
            Backend,
            amgcl::runtime::coarsening::wrapper,
            amgcl::runtime::relaxation::wrapper
            >,
        amgcl::runtime::solver::wrapper<Backend>
        > Solver;
    
    This allows to reuse the same amgcl::amg implementation both for compile-time and runtime interfaces, and greately reduces compilation time and memory requirements for the library.
  • Got rid of as many Boost dependencies as possible in favor of C++11. Currently , only the runtime interface depends on Boost , as it uses boost::property_tree::ptree for defining runtime parameters.
    It should be possible to use the compile-time interface completely Boost-free. This also means that one should replace all uses of boost::tie and boost::make_tuple in amgcl-related code with std::tie and std::make_tuple. For example:
    Solver solve(std::tie(n, ptr, col, val));
    std::tie(iters, error) = solve(f, x);
    
  • Provide amgcl::backend::bytes() function that returns (sometimes approximately) the amount of memory allocated for an amgcl object. std::string amgcl::backend::human_readable_memory(size_t) converts bytes to a human-readable size string (e.g. 1024 is converted to 1 K).
  • Initial support for mixed-precision computations (where iterative solver and preconditioner use different precisions).
  • MPI versions of CPR preconditioners. Support for statically-sized matrices in global preconditioners of CPR. Support for mixed precision in global and pressure-specific parts of CPR.
  • epetra_map was moved to adapter namespace.
  • Eigen backend was split into adapter and backend part.
  • amgcl::make_scaling_solver has been replaced with amgcl::scaled_problem adapter.

This is marked as pre-release, because the documentation still needs to be updated.

amgcl - 1.2.0

Published by ddemidov over 6 years ago

  • Change default value of smoothed_aggregation.aggr.eps_strong
    from 0 to 0.08. This should work better for anisotropic cases.
  • Pressure mask may be set with a pattern in Schur pressure correction
    preconditioner.
  • When using async_setup, allow to exit initialization thread early in
    case the solution has already converged.
  • Stable implementation of inner product in OpenMP backend. This makes
    the solution deterministic for a fixed number of OpenMP threads.
  • Support non-zero initial condition in BiCGStab(L).
  • Switch implementation of BiCGStab(L) to Fokkema's version [1].
  • Support both left and right preconditioning in BiCGStab, BiCGStab(L),
    GMGES, CG.
  • Improve performance/scalability of mpi::subdomain_deflation.
  • Minor bug fixes and improvements.

[1] Fokkema, Diederik R. Enhanced implementation of BiCGstab (l) for
solving linear systems of equations. Universiteit Utrecht.
Mathematisch Instituut, 1996.

amgcl - 1.1.0

Published by ddemidov about 7 years ago

  • Improve profiling: allow users to configure profiling operations.
  • Implement adapter::reorder for matrices and vectors. Allows to
    transparently apply Cuthill-McKee reordering to the system matrix and
    RHS before solution.
  • Improve performance of Schur pressure correction preconditioner by
    (optionally) approximating inverse of Kuu matrix with its inverted
    diagonal.
  • Use power iteration to estimate spectral radius in smoothed_aggregation.
    This improves convergence rate at the cost of setup time.
    The total time is usually improved, but may suffer on GPGPU backends.
  • Adding IDR(s) iterative solver (http://ta.twi.tudelft.nl/nw/users/gijzen/IDR.html).
  • Improve performance and scalability of mpi::subdomain_deflation
    preconditioner.
  • Support matrix-free solution with mpi::subdomain_deflation.
  • Provide amgcl::put(ptree p, string s) where s has key=value format.
    This makes parsing of command line parameters easier.
  • Add shared and distributed memory benchmarks to the documentation.
  • Add Clang and OSX tests on Travis-CI.
  • Minor bug fixes and improvements.
amgcl - 1.0.0

Published by ddemidov over 7 years ago

  • Implemented OpenMP versions of incomplete LU smoothers (ilu0, iluk, ilut), and got rid of now obsolete parallel_ilu0 smoother. Parallel algorithm is based on level scheduling approach and is automatically selected when there are four or more OpenMP threads.
  • Reimplemented multicolor Gauss-Seidel smoother, merged the new implementation with gauss_seidel, and got rid of obsolete multicolor_gauss_seidel smoother. Parallel algorithm is based on level scheduling approach and is automatically selected when there are four or more OpenMP threads.
  • Code cleanup, minor improvements and bug fixes.
amgcl - 0.9.1

Published by ddemidov over 7 years ago

Mostly a bug fix release.

  • Fixed a bug in matrix-matrix product.
  • Allow to disable selected components from runtime interface to reduce compilation overhead (see #45).
amgcl - 0.9.0

Published by ddemidov over 7 years ago

  • Use NUMA-friendly internal data structures.
    This shows measurable speed-up on NUMA systems.
  • Allow asynchronous amg setup.
    amgcl::amg constructor starts the setup process in a new thread. As soon
    as constructor returns, the instance is ready to be used as a
    preconditioner. Initially its just a single-level smoother, but when as
    the new (coarser) levels are constructed, they are put to use.
    In case of GPGPU backends, this should allow to overlap work between
    host CPU doing setup and the compute device doing the solution. In some
    cases a 2x speedup of the overall solution has been achieved.
  • Allow limiting number of amg levels, thus supporting using relaxation
    for coarse solves.
  • Rewrite lgmres and fgmres in terms of Givens rotations, which should
    work better with complex problems, see #34.
  • Use new, more effective, sparse matrix format in VexCL backend and
    allow to use non-scalar values with the backend.
  • Modernize cmake scripts.
    Provide amgcl::amgcl imported target, so that users may just
    find_package(amgcl)
    add_executable(myprogram myprogram.cpp)
    target_link_libraries(myprogram amgcl::amgcl)
    
    to build a program using amgcl. The imported target brings necessary
    compile and link options automatically.
  • Replace boost.python with pybind11 and
    improve python interface.
  • Unify example codes for different backends.
  • Minor improvements and bug fixes
amgcl - 0.8.1

Published by ddemidov about 8 years ago

  • Implemented LGMRES solver ("Loose" GMRES, [BaJM05]).
  • Implemented FGMRES solver (Flexible GMRES, [Saad03]).
  • GMRES uses real residual instead of preconditioned one in termination condition.
  • Performance improvements in components using QR decomposition (spai1,
    aggregation with null-space provided).
  • Provided python examples.
  • Minor bug fixes and improvements.
amgcl - 0.8.0

Published by ddemidov over 8 years ago

  • Updated two-stage preconditioners
    • Replaced SIMPLE preconditioner with Schur complement pressure correction.
    • Implemented MPI version of Schur complement pressure correction preconditioner.
    • Made CPR preconditioner actually work.
  • Breaking changes
    • Renamed amgcl/amgcl.hpp -> amgcl/amg.hpp
  • Added support for complex and non-scalar values for coefficients/unknowns.
  • Implemented ILU(k) smoother/preconditioner.
  • Added MPI block-preconditioner wrapper.
  • Introduced mpi::make_solver.
  • Allow using make_solver as preconditioner.
  • Improve Matrix-Matrix product performance for many-cored CPUs.
  • Provide MatrixMarket format I/O functions.
  • Generalize profiler class, provide a couple of custom performance counters.
  • Improve coarse solution performance on GPGPU backends.
  • Allow checking for consistency of runtime parameters.
  • Move documentation to http://amgcl.readthedocs.org.
  • Various bugfixes and improvements.
amgcl - 0.7.0

Published by ddemidov almost 9 years ago

This is rather big and an API breaking release!

  • All runtime parameters (namely, coarsening type, relaxation type, and solver
    type) were moved to the generic parameter structure (stored in
    boost::property_tree). So the following code:
boost::property_tree::ptree prm;
typedef amgcl::runtime::make_solver< amgcl::backend::builtin<double> > Solver;
Solver S(amgcl::runtime::coarsening::smoothed_aggregation,
     amgcl::runtime::relaxation::spai0,
     amgcl::runtime::solver::bicgstab,
     A, prm);

would have to be changed to

boost::property_tree::ptree prm;
typedef amgcl::runtime::make_solver< amgcl::backend::builtin<double> > Solver;
prm.put("precond.coarsening.type", amgcl::runtime::coarsening::smoothed_aggregation);
prm.put("precond.relaxation.type", amgcl::runtime::relaxation::spai0);
prm.put("solver.type",     amgcl::runtime::solver::bicgstab);
Solver S(A, prm);

This is done as part of the effort to generalize use of preconditioners
in the library, so that any preconditioner supported by AMGCL could be
uniformly constructed with the system matrix and the parameters.

  • amg::top_matrix() method was renamed to amg::system_matrix() for the same reason.

  • The use of preconditioners in AMGCL was generalized. A class that may be used
    as a preconditioner should have the following properties:

    • Provide public type backend_type for its backend.
    • Provide public type params containing its parameters.
    • Have constructor that takes three arguments:
    • System matrix
    • Parameters
    • Backend parameters
    • Export the system matrix in the backend format through system_matrix()
      method.

    A preconditioner may be used in the following contexts:

    • As a parameter to an iterative solver.
    • As a template parameter to make_solver class.
    • As a template parameter to a two-step preconditioner (CPR and SIMPLE).
    • As a template parameter to subdomain deflation class (as a local preconditioner).
  • Added amgcl::as_preconditioner<Backend, Relaxation> and amgcl::runtime::as_preconditioner<Backend>
    wrapper classes that allow to use smoothers as preconditioners.

  • Added ILUT(p,tau) smoother/preconditioner.

  • Implemented Chow and Patel version of parallel ILU. This allowed to enable
    ILU-type smoothers on all backends, but may not work as well as serial version
    for some problems.

  • Provided a wrapper for cuSPARSE implementation of ILU0 on CUDA backend.

  • Added adapter for complex-valued matrices. This uses an equivalent real
    formulation (ERF) for the matrix so that it may be solved with AMGCL.

  • Added zero copy matrix adapter for CRS matrices. The adapter allows to skip
    copy and thus save some memory for matrices that are binary compatible with
    internal AMGCL storage. Basically, that means that row pointer and column
    number arrays should be either signed or unsigned ptrdiff_t.

  • Provided wrapper interface for Fortran.

amgcl - 0.6.4

Published by ddemidov almost 9 years ago

This is the last release before API-breaking 0.7.0

  • Implemented two-step preconditioners for Navier-Stokes type
    problems (CPR and SIMPLE).
  • Implemented multicolor Gauss-Seidel smoother
  • Get rid of mandatory dependence on std::chrono
  • Bug fixes and minor improvements
amgcl - 0.6.3

Published by ddemidov over 9 years ago

  • Use norm of right-hand side instead of initial error for scaling residuals in
    iterative solvers. This yields consistent results when starting with a decent
    initial approximation.
  • Provide an HPX backend.
  • Accept near null-space vectors for aggregation-based coarsening.
  • Added SPAI(1) smoother (may work better than SPAI(0), but is extremely slow
    to setup for larger problems).
  • Iterative solvers now provide apply() methods, so that they may be used as
    preconditioners themselves.
  • Various fixes and improvements.
amgcl - 0.6.2

Published by ddemidov almost 10 years ago

  • Added adapter for ublas types.
    Provides amgcl::backend::map() for ublas::compressed_matrix and allows
    to use ublas vectors with builtin backend.
  • Moved make_solver parameters into single params struct
    This is an API breaking change!
    This unifies treatment of amg and solver params in amgcl::make_solver,
    amgcl::runtime::make_solver, and amgcl::mpi::subdmain_deflation classes.
    Now, whenever a class contains both an amg hierarchy and an iterative
    solver, the amg parameters may be accessed through the class
    params::amg, and the solver parameters -- through params::solver.
  • Fixed pyamgcl for use with python3 and arch linux.
amgcl - 0.6.1

Published by ddemidov about 10 years ago

Minor bug fixes

amgcl - 0.6.0

Published by ddemidov about 10 years ago

This is a rather big release with lots of new features.

  • Added crs_builder backend. The backend is similar to crs_tuple in the sense
    that it is only used for initialization of AMG hierarchy. The difference is
    that crs_builder does not need fully constructed matrix in CRS format (which
    would be copied into AMG anyway), but builds matrix rows as needed. This
    results in reduced memory requirements.
  • Implemented MPI solver with subdomain deflation in collaboration with
    @RiccardoRossi. The method allows solution on parallel machines with
    distributed memory and has very good scalability.
  • Implemented BiCGStab(L) iterative solver.
  • Added an adapter for Epetra_CrsMatrix from Trilinos project.
  • Added SkylineLU sparse direct solver. This allows for larger coarse levels in
    builtin backend, which improves convergence and solve time. Again, thanks to
    @RiccardoRossi for help.
  • Added classes in amgcl::runtime namespace that allow for runtime
    configuration of multigrid template parameters. This makes AMGCL easy to use
    in 3rd party libraries/applications.
  • Provided Delphi wrapper for AMGCL.
  • Provided python wrapper for AMGCL. May be installed by
    pip install pyamgcl
  • New tests and examples
  • Various improvements and bug fixes.
amgcl - 0.5.0 aka v2

Published by ddemidov over 10 years ago

This is a major change in the library interface and implementation.
The code base has been rewritten from scratch to decouple various components of
the AMG method, such as backends, coarseners, smoothers, and iterative solvers.

This makes extending the library much easier. See the README for more information.

amgcl - 0.3.2 aka v1

Published by ddemidov over 10 years ago

The main purpose of this release is to make a snapshot of the current library API before switching to v2 branch.

Some changes that were made since the last release: