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

Overview

AMGCL

Documentation Status DOI Build Status Build status codecov Coverity Scan Build Status

AMGCL is a header-only C++ library for solving large sparse linear systems with algebraic multigrid (AMG) method. AMG is one of the most effective iterative methods for solution of equation systems arising, for example, from discretizing PDEs on unstructured grids. The method can be used as a black-box solver for various computational problems, since it does not require any information about the underlying geometry. AMG is often used not as a standalone solver but as a preconditioner within an iterative solver (e.g. Conjugate Gradients, BiCGStab, or GMRES).

AMGCL builds the AMG hierarchy on a CPU and then transfers it to one of the provided backends. This allows for transparent acceleration of the solution phase with help of OpenCL, CUDA, or OpenMP technologies. Users may provide their own backends which enables tight integration between AMGCL and the user code.

See AMGCL documentation at http://amgcl.readthedocs.io/

Referencing

Demidov, Denis. AMGCL: An efficient, flexible, and extensible algebraic multigrid implementation. Lobachevskii Journal of Mathematics, 40(5):535–546, May 2019. doi pdf bib

Demidov, Denis. AMGCL -- A C++ library for efficient solution of large sparse linear systems. Software Impacts, 6:100037, November 2020. doi bib

Demidov, Denis, Lin Mu, and Bin Wang. Accelerating linear solvers for Stokes problems with C++ metaprogramming. Journal of Computational Science (2020): 101285. doi arxiv bib

Support

Issues
  • Stokes problem gives NaN by AMG but GMRES works fine

    Stokes problem gives NaN by AMG but GMRES works fine

    I'm trying to use AMGCL to solve a simple Stokes problem using finite element method. The linear system is similar to Naiver-Stokes one:

    [K G * {u = {b_u D S] p} b_p}

    2nd Order FEM System size: 4080 x 4080 u is the unknows for velocity from 1 - 3600 p is the unkonws for pressure from 3601-4080

    Tets=48 (I tried larger mesh which still gives me the similar error)

    G and D are non-square. S has zero-diagonal. This is a typical saddle-point problem matrix for Stokes. image

    Download the linear system here Ab_mm.zip

    Based on the benchmark problem, I trying to solve the system using following solver

    1. GMRES + ILU0, GOOD
    2. AMG + ILU0 and, NAN
    3. Schur Pressure AMG. Crash

    But only 1) GMRES + ILU0 wokrs, any AMG solver return nan or Crash.

    Can you check why AMGCL is not working here?

    Thanks, Bin

    output info:

    Solver
    ======
    Type:             FGMRES(30)
    Unknowns:         4080
    Memory footprint: 1.94 M
    
    Preconditioner
    ==============
    Number of levels:    2
    Operator complexity: 1.01
    Grid complexity:     1.02
    Memory footprint:    6.88 M
    
    level     unknowns       nonzeros      memory
    ---------------------------------------------
        0         4080         201072      6.85 M (98.77%)
        1           71           2503     37.69 K ( 1.23%)
    
    #Iters=1000 Error=nan
    

    My solver set up are:

    typedef amgcl::backend::builtin<double> Backend;
    
    //Simple iterative solver GMRES + ILU0
    typedef amgcl::make_solver<
    	relaxation::as_preconditioner<Backend, relaxation::ilu0>,
    	solver::fgmres<Backend>
    > Solver1;
    
    //AMG + ILU0
    typedef make_solver<
    	amg<Backend, coarsening::smoothed_aggregation, relaxation::ilu0>,
    	solver::fgmres<Backend>
    > Solver2;
    
    //Parameter setup
    Solver::params prm;
    double tol = 1e-6;
    prm.solver.tol = tol;
    prm.solver.maxiter = 1000;
    
    //Solve the system
    Solver solve(A,prm);
    std::cout << solve << std::endl;
    
    int iters;
    double error;
    std::tie(iters, error) = solve(b, X);
    printf("#Iters=%d Error=%lf\n", iters, error);
    

    Specially my schur_pressure_correction are:

    typedef make_solver<
    	preconditioner::schur_pressure_correction<
    	make_solver<
    	relaxation::as_preconditioner<Backend, relaxation::damped_jacobi>,
    	solver::bicgstab<Backend>
    	>,
    	make_solver<
    	amg<
    	Backend,
    	coarsening::smoothed_aggregation,
    	relaxation::ilu0
    	>,
    	solver::fgmres<Backend>
    	>
    	>,
    	solver::fgmres<Backend>
    > Solver;
    
    //Parameter setup
    Solver::params prm;
    double tol = 1.0e-6;
    prm.solver.tol = tol;
    prm.precond.usolver.solver.tol = tol * 10;
    prm.precond.psolver.solver.tol = tol * 10;
    prm.precond.psolver.solver.maxiter = 1000;
    prm.precond.usolver.solver.maxiter = 1000;
    
    for(size_t i=0;i<rows;++i)
    	if(i>3600) prm.precond.pmask[i] = 1;
    
    //Solve the system
    Solver solve(A,prm);
    std::cout << solve << std::endl;
    
    int iters;
    double error;
    std::tie(iters, error) = solve(b, X);
    printf("#Iters=%d Error=%lf\n", iters, error);
    
    opened by BinWang0213 61
  • Complex GMRES solver

    Complex GMRES solver

    I may have found a small bug in the generic GMRES implementation. Please take a look at [1] in Section 6.5.9 on the complex implementation of GMRES. They state that the complex Givens rotation is defined slightly different from the real one, see equation 6.80. When I change it here accordingly, I get much better convergence in the complex case. Can you confirm this? Do you think there will be a similar issue for LGMRES and FGMRES?

    Chris

    [1] Saad, Yousef. Iterative methods for sparse linear systems. Siam, 2003.

    opened by dondieselkopf 33
  • Two-phase oil reservoir simulation

    Two-phase oil reservoir simulation

    Dear Denis,

    I suggest to continue the issue #168 in this topic, since the original issue seems to be more fundamental and is not really related to just Cutheel-mckee algorithm.

    I am implementing a scheme of numerical solution of the two-phase oil-reservoir model. The phases are oil and water. As a test case I consider the simplest system, both fluids are incompressible, densities and viscosities are fixed. No capillary pressure.

    I am using the Finite Volume Method for the partial differential equations discretization, and I am solving the problem in (s_water; pressure) variables using the Newton algorithm to linearize the algebraic problem. s_oil is simply s_oil = 1 - s_water.

    The particular problem that I report here is a 38x38 cells 2D square reservoir with two wells. The initial condition is s_oil_0 = 1, p_0 = -1. The boundary conditions are left and right sides are impermeable for liquids, the upper and lower bounds of the box are at fixed pressure, p = p_0 = -1. One well is is injection well and the other is a production well.

    The vector of unknows is composed as s_water for every cell followed by pressure for every cell. Thus a matrix with a 2x2 block structure is obtained as shown in figure sparseMatrixStructure

    The lower-right block contains some non-zero elements due to boundary condition which currently assume an inflow of water through the upper and lower boundaries of reservoir.

    The problem is that while using the AMGCL library, the linear system can be solved for the grids with the number of cells less than 39 in every direction. The finest allowed grid is of 38x38 cells, and the lower right block of the matrix contains 36 successive lines of zeros between the lines corresponding to the boundary conditions (with non-zero elements on the main diagonal).

    I am using the Eigen library and the RowMajor SparseMatrix class to store my matrix A

    typedef Eigen::SparseMatrix<double, RowMajor> SpMat;
    SpMat  A(2*N, 2*N);
    

    Then, I use the following code to interface with the AMGCL

    #include <amgcl/adapter/eigen.hpp>
    #include <amgcl/backend/builtin.hpp>
    #include <amgcl/make_solver.hpp>
    #include <amgcl/solver/gmres.hpp>
    #include <amgcl/amg.hpp>
    #include <amgcl/coarsening/smoothed_aggregation.hpp>
    #include <amgcl/relaxation/spai0.hpp>
    
    typedef amgcl::make_solver<
    	amgcl::amg<
    	amgcl::backend::builtin<double>,
    	amgcl::coarsening::smoothed_aggregation,
    	amgcl::relaxation::spai0
    	>,
    	amgcl::solver::gmres<amgcl::backend::builtin<double> >
    > Solver_AMG;
    
    Solver_AMG solve(A);
    int    iters;
    double error;
    std::tie(iters, error) = solve(b0, u_Next);
    

    For the number of grid cells more or equal to 39x39 I obtain the following error

    Unhandled exception at 0x00007FFE31883E49 in OilReservoir_Eigen.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0000002F1D0FE908. occurred
    

    image

    Pressing F5 in Visual Studio 2019, I get this with D of all zeros (715 elements total)

    OilReservoir_Eigen.exe has triggered a breakpoint. occurred
    

    image

    So, my concerns are as follows. I appreciate if you could kindly comment on them.

    1. The Eigen library implements SparseLU direct solver that solves the problem for any grid sizes. And the solution is physically reasonable. So, I do not prone to believe that the issue is "This looks like a memory error somewhere in your program", as you suggested in issue #168.

    2. I do not think that the Schur pressure correction approach is (physically) justified approach in this case. Consider the reservoir with s_oil = s_water = 0.5 in every cell and uniform pressure. Then, the two lines of blocks would be equivalent, so I cannot simply disregard the non-zeros in the lower right block of matrix in the iterative solver.

    3. Should I reorder the vector of unknows so that every two successive lines in the matrix are related to the same grid cell, but represent two equations, one for every phase. Then I could say that the matrix contains NxN cells (N - totl number of cells in the grid), where every cell is a 2x2 block. Thus, every grid cell is described by a 2x2 "tensor". Then, I could use the option amgcl::static_matrix<2,2,double> to initialize the amg solver?

    4. Does the implemented backend for Eigen support the Eigen::SparseMatrix<double, RowMajor> simultaneously with amgcl::static_matrix<2,2,double>?

    opened by ArturSalamatin 32
  • A consultation about ILU0

    A consultation about ILU0

    Hi Denis

    I have tested the elasticity problem using the solver:

    // namely solver1
    typedef amgcl::make_solver<
            amgcl::amg<
                PBackend,
                amgcl::coarsening::smoothed_aggregation,
                amgcl::relaxation::ilu0
                >,
            amgcl::solver::cg<SBackend>
            > Solver;
    

    solver1 is solved suited to my problem, and it converges after:

    AMGIters: 10
    AMGError: 4.73559e-07
    [  AMGsetup:         0.285 s]
    [  AMGsolve:         4.578 s]
    

    Its convergence rate is much greater than that of the PCG (preconditioned with ILU0, default) on MATLAB:

    % namely solver2
    [L,U] = ilu(K);
       x  = pcg(K,F,1e-6,1000,L,U);
    

    solver2 converges after 91 iterations, but it cost 0.56s (wall time).

    It seems slover2 is more efficient than solver1.

    Then I choose the ILU(0) as a preconditioner of CG on AMGCL using the code:

    // namely solver3
    typedef amgcl::make_solver<
            amgcl::relaxation::as_preconditioner<
            PBackend,
            amgcl::relaxation::ilu0
            >,
            amgcl::solver::cg<SBackend>
            > PCG_Solver; 
    

    solver3 converges after:

    PCGIters: 104
    PCGError: 8.77976e-09
    [  PCGsetup:         0.055 s]
    [  PCGsolve:        23.976 s]
    

    solver3 spends more time than solver2. and I also tested the CG on AMGCL, it converges after 924 iterations:

    CGIters: 924
    CGError: 9.21561e-07
    [  CGsetup:          0.005 s]
    [  CGsolve:          1.373 s]
    

    it was close to the CG on MATLAB, which converges after 922 iterations and costs 1.75s. The CG preconditioned with saAMG and spai0 cost 0.397s and it converges after 71 iterations.


    • Am I right about the configuration and the finding?
    • Then if ILU(0) should be realized in a more efficient way? And should it be worthy to do?

    --- Thanks, have a nice day

    opened by PM-Hu 27
  • Getting start with amgcl on Visual Studio 2012

    Getting start with amgcl on Visual Studio 2012

    Hi Denis,

    Thanks for your work about this open source package. I am a student working on solve large dense linear system (i.e. Ax = b where A is dense and large). I wrote my own iterative complex gmres solver with preconditioner and I hope I can get a better performance with this amazing amgcl package. I am new to amgcl and based on my previous experience, to use this header-only package, I only need to let the compiler know the path to include the headers. And also to use amgcl, I also tried to build a boost library. However, when I tried to include headers in the "getting start" example in tutorial, it has several errors:

    Code:

    #include <amgcl/make_solver.hpp>
    #include <amgcl/solver/bicgstab.hpp>
    #include <amgcl/amg.hpp>
    #include <amgcl/coarsening/smoothed_aggregation.hpp>
    #include <amgcl/relaxation/spai0.hpp>
    #include <amgcl/adapter/crs_tuple.hpp>
    
    int main(){
    return 0;
    }
    

    Errors: image

    My env: Visual Studio 2012 w/ msvc-11.0 Boost 1.69

    I wonder what other steps I need or what I did wrong to make amgcl work on my system. I am sorry if this question is too simple since I am really new to these stuff. Any help will be appreciated.

    opened by ZhuonanLin 26
  • zero copy, 64-bit ptr_type and 32-bit col_type

    zero copy, 64-bit ptr_type and 32-bit col_type

    Hi, I'm using AMGCL for reconstruction in cosmology (large unstructured Poisson systems), and it works extremely well (so congratulations and thank you for this very nice piece of software). My matrix representation is optimized for large systems (10^8 times 10^8 with 16 NNZ per row in average), so I'm representing it using 32-bit indices for the col array, and 64-bit indices for the ptr array. I'm using the zero_copy adpater, that requires all indices to be 64 bits (so I need to copy the col array, which represents 13 GBytes of data). Is there a way to configure AMGCL to use 32 bit col indices ? I have seen that the internal crs matrix representation is templated by value type, col index type and ptr index type, and that the builtin backend uses the same type for col index and ptr index. I have tried to modify the builtin backend (with no success, it compiled but crashed at execution time), do you have any advice ?

    opened by BrunoLevy 23
  • Block preconditioners in AMGCL for u,p formulation

    Block preconditioners in AMGCL for u,p formulation

    Hi I have been racking my brains to solve U,P formulation for elasticity equations using AMGCL, to no avail..

    using Backend = amgcl::backend::eigen<double>;
    using AmgSolver1 = amgcl::make_solver<
        amgcl::preconditioner::schur_pressure_correction<
            amgcl::make_solver<
                amgcl::relaxation::as_preconditioner<Backend, amgcl::relaxation::damped_jacobi>,
                amgcl::solver::bicgstab<Backend>
                >,
            amgcl::make_solver<
                amgcl::amg<
                    Backend,
                    amgcl::coarsening::smoothed_aggregation,
                    amgcl::relaxation::ilu0
                    >,
                amgcl::solver::gmres<Backend>
                >
            >,
        amgcl::solver::gmres<Backend>
        >;
    
    AmgSolver1::params prm;
    
    prm.solver.tol = 1e-5;	
    prm.precond.usolver.solver.tol = prm.solver.tol * 10;
    prm.precond.psolver.solver.tol = prm.solver.tol * 10;
    prm.precond.psolver.solver.maxiter = 100;
    prm.precond.usolver.solver.maxiter = 200;
    prm.solver.maxiter = 400;
    
    prm.precond.pmask.resize(Bm.size(), 0);
    for(size_t i = _numLocalDofs[0]; i < Bm.size(); ++i)
        prm.precond.pmask[i] = 1;
    
    
    //prm.precond.usolver.precond.max_levels = 3;
    //prm.precond.ncycle = 2;
    //prm.precond.npre = 4;
    //prm.precond.pre_cycles = 4;
    
    AmgSolver1 solver(*A, prm);		
    
    int    iters;
    double error;
    std::tie(iters, error) = solver(Bm, X);
    std::cout << iters << " " << error << std::endl;
    
    return X;
    
    

    I am unable to set even number of levels for these preconditioners. It appears already pre-chosen and fixed despite what I set it to.

    Either way the solver fails with Segmentation fault.

    Can you provide any insight as to what I might be missing?

    Many Thanks!

    opened by saurabh636 23
  • Complex-valued problems

    Complex-valued problems

    Hi.

    I would like to solve a complex-valued problem without rewriting it into a real-valued one. Unfortunately, I wasn't successful in using std::complex instead of double. I get a bunch of errors, for a large part related to implicit conversion where you wrote "1/x" instead of "1./x". Also, some comparisons have to be rewritten as "fabs(eps)>fabs(x)". Both can be fixed straightforwardly.

    However, I was wondering whether you see more substantial issues within the algorithms when plugging in a complex type?

    Thanks, Chris

    opened by dondieselkopf 23
  • Using null-space vectors with block relaxation

    Using null-space vectors with block relaxation

    Hi, I use amgcl for large linear elasticity models. The problems only use translational degrees of freedom (3 degrees of freedom per node). Models tend to calculate fastest with block 3x3 aggregation and ilu relaxation. This settings fail to converge for some models, and overall providing null-space vectors seems to help with convergence.

    When using null-space vectors, the overall calculation time increases by a lot. Looking at the profiler, it seems that relaxation step is taking a lot more time. Is there any possibility of adjusting (or editing in code) ilu relaxation, so that it behaves similarly to situation, when block solve is being run? If I understand correctly, that would give me best of both routes - coarsening using null-space vectors (better convergence) and block relaxation (faster calculation).

    Here are is an example from both runs.

    Solver: CG, preconditioner: AMG, coarsener: Aggregation, smoother: ILU0
    Solver
    ======
    Type:             CG
    Unknowns:         1772994
    Memory footprint: 54.11 M
    Preconditioner
    ==============
    Number of levels:    4
    Operator complexity: 1.11
    Grid complexity:     1.08
    Memory footprint:    3.70 G
    level     unknowns       nonzeros      memory
    ---------------------------------------------
        0      1772994      136267422      3.36 G (90.43%)
        1       127518       13873716    340.45 M ( 9.21%)
        2         6288         539856     13.49 M ( 0.36%)
        3          294          11700    122.57 K ( 0.01%)
    Convergence status: true
    Number of iterations run: 59
    Residual error: 7.16936e-07
    [Profile:                 18.801 s] (100.00%)
    [ self:                    8.342 s] ( 44.37%)
    [  CSR copy:               0.468 s] (  2.49%)
    [  axpby:                  0.011 s] (  0.06%)
    [  clear:                  0.021 s] (  0.11%)
    [  coarse:                 1.530 s] (  8.14%)
    [  coarse operator:        0.699 s] (  3.72%)
    [  coarsest level:         0.001 s] (  0.01%)
    [  copy:                   0.009 s] (  0.05%)
    [  inner_product:          1.639 s] (  8.72%)
    [  move to backend:        1.124 s] (  5.98%)
    [  relax:                  0.114 s] (  0.61%)
    [    axpby:                0.046 s] (  0.24%)
    [    residual:             0.033 s] (  0.18%)
    [    vmul:                 0.035 s] (  0.18%)
    [  relaxation:             3.681 s] ( 19.58%)
    [  residual:               0.023 s] (  0.12%)
    [  spmv:                   0.049 s] (  0.26%)
    [  transfer operators:     1.089 s] (  5.79%)
    [   self:                  0.104 s] (  0.55%)
    [    aggregates:           0.405 s] (  2.15%)
    [    interpolation:        0.580 s] (  3.09%)
    [      tentative:          0.571 s] (  3.04%)`
    
    Solver: CG, preconditioner: AMG, coarsener: Aggregation, smoother: ILU0
    Solver
    ======
    Type:             CG
    Unknowns:         590998
    Memory footprint: 54.11 M
    Preconditioner
    ==============
    Number of levels:    4
    Operator complexity: 1.03
    Grid complexity:     1.04
    Memory footprint:    1.37 G
    level     unknowns       nonzeros      memory
    ---------------------------------------------
        0       590998       15142730      1.34 G (97.35%)
        1        22107         385465     35.99 M ( 2.48%)
        2         1774          25390      2.42 M ( 0.16%)
        3          192           1974    339.36 K ( 0.01%)
    Convergence status: true
    Number of iterations run: 118
    Residual error: 8.33269e-07
    [Profile:                 12.139 s] (100.00%)
    [ self:                    5.816 s] ( 47.91%)
    [  CSR copy:               0.574 s] (  4.73%)
    [  axpby:                  0.011 s] (  0.09%)
    [  clear:                  0.006 s] (  0.05%)
    [  coarse:                 1.623 s] ( 13.37%)
    [  coarse operator:        0.146 s] (  1.20%)
    [  coarsest level:         0.004 s] (  0.03%)
    [  copy:                   0.006 s] (  0.05%)
    [  inner_product:          1.691 s] ( 13.93%)
    [  move to backend:        0.506 s] (  4.17%)
    [  relax:                  0.135 s] (  1.11%)
    [    axpby:                0.034 s] (  0.28%)
    [    residual:             0.058 s] (  0.48%)
    [    vmul:                 0.042 s] (  0.34%)
    [  relaxation:             1.307 s] ( 10.77%)
    [  residual:               0.023 s] (  0.19%)
    [  spmv:                   0.065 s] (  0.54%)
    [  transfer operators:     0.225 s] (  1.85%)
    [    aggregates:           0.208 s] (  1.71%)
    [    interpolation:        0.005 s] (  0.04%)
    [      tentative:          0.004 s] (  0.03%)
    

    On an unrelated note, I am also struggling with using smoothed aggregation with null-space vectors. They calculate much longer that standard aggregation, which seems counter-intuitive.

    opened by dokotor 22
  • Question: How to retrieve the initial residual from the linear solvers?

    Question: How to retrieve the initial residual from the linear solvers?

    I am thinking of implementing AMGCL in an application but I need to provide the application with the initial residual of the solve process and of course the final residual and number of iterations at the end of the process as input for the overall simulation progress monitoring.

    How can I retrieve or calculate the initial residual?

    A complete simulation requires 500 to 10.000 x5 linear systems solves to reach overall convergence and this progress is monitored.

    opened by klausbu 22
  • Question: Using amgcl with MPI

    Question: Using amgcl with MPI

    So I am reading through the benchmark distributed Poisson equation implementation to figure out how I could have the linear elasticity problem I have with amgcl run on several MPI nodes. But I still have some questions I was hoping you might answer:

    • How do I split up my matrix on each node? Assuming I have hexahedral elements. Do I create smaller matrices for sub-volumes of the full image?
    • Do I have one node in each direction of overlap?
    • Are the matrices on each node stored with local indices, or do I store the global index for each element?
    • Do I need to tell amgcl the overlap somewhere? I couldn't find anything hinting at that.
    • Is it also possible for the MPI version to use my custom matrix class as input (which is working for the shared memory version)?
    question 
    opened by NOhs 22
  • OpenMP is enabled whenever it is found in the system

    OpenMP is enabled whenever it is found in the system

    In CmakeLists.txt, if OpenMP is found on the system, it is unconditionally enabled:

    https://github.com/ddemidov/amgcl/blob/c71ab45f911771c108b1842ea7cd11b62432bbf3/CMakeLists.txt#L60-L68

    However, I may want to compile my application without OpenMP even though it is installed. Currently, there is no way to do that.

    amgcl could define a CMake option to enable/disable use of OpenMP.

    opened by ilyapopov 2
  • Boost is unconditional dependency in CMakeLists.txt

    Boost is unconditional dependency in CMakeLists.txt

    In CMakeLists, boost is requires dependency:

    https://github.com/ddemidov/amgcl/blob/c71ab45f911771c108b1842ea7cd11b62432bbf3/CMakeLists.txt#L31-L35

    although amgcl can works fine without boost with AMGCL_NO_BOOST preprocessor macro (without runtime interface).

    I can use amgcl by specifying include paths directly, bypassing CMakeLists, but is would be good if amgcl's build system was made more flexible about Boost.

    opened by ilyapopov 1
  • Linking CXX executable solver_cuda error

    Linking CXX executable solver_cuda error

    [ 39%] Linking CXX executable solver_cuda /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/solver_cuda.dir/solver_cuda_intermediate_link.o: in function __cudaRegisterLinkedBinary_38_cuda_device_runtime_compute_86_cpp1_ii_8b1a5d37': link.stub:(.text+0xad): undefined reference to__fatbinwrap_38_cuda_device_runtime_compute_86_cpp1_ii_8b1a5d37' collect2: error: ld returned 1 exit status

    Could you please help me out with this error.

    opened by ztdepztdep 1
  • Why the example(poisson3Db)'s comsume time on my computer is so slower than you give?

    Why the example(poisson3Db)'s comsume time on my computer is so slower than you give?

    Hello! I write a finite element system for my work, and I want to use amgcl to accelerate my system solving speed. but when I run the poisson3Db example or my system by amgcl on my computer, the solving speed is so slow. I don't know the reason. Can you give me some suggestions to solve this problem? my computer processor is Intel(R) Core(TM) i5-7200U CPU @2.50GHz. the running result of poisson3Db on my computer is like as follows:

    Matrix c:\poisson3Db.mtx: 85623x85623 RHS c:\poisson3Db_b.mtx: 85623x1 Solver

    Type: BiCGStab Unknowns: 85623 Memory footprint: 4.57 M

    Preconditioner

    Number of levels: 3 Operator complexity: 1.20 Grid complexity: 1.08 Memory footprint: 58.93 M

    level unknowns nonzeros memory

    0        85623        2374949     50.07 M (83.20%)
    1         6361         446833      7.78 M (15.65%)
    2          384          32566      1.08 M ( 1.14%)
    

    Iters: 24 Error: 8.33789e-09

    [poisson3Db: 132.982 s] (100.00%) [ read: 90.995 s] ( 68.43%) [ setup: 8.703 s] ( 6.54%) [ solve: 33.273 s] ( 25.02%)

    opened by kju512 2
  • ILU preconditioner error

    ILU preconditioner error

    Hi I am trying to solve a complex number system with the ILU0 preconditioner (single level), the declaration is

    typedef amgcl::backend::builtin< std::complex<data_type> > Backend;
    	typedef amgcl::make_solver<
    		amgcl::relaxation::as_preconditioner<Backend, relaxation::ilu0>,
    		amgcl::solver::fgmres<Backend>
    	> Solver;
    
    this->solve = new Solver(std::tie(mat_size, preconditioner_ia, 
                                     preconditioner_ja, preconditioner_a), prm);
    std::tie(iters, error_out) = (*(this->solve))(*this, x, y);
    

    the preconditioner_ia, preconditioner_ja, preconditioner_a are the row, column, and value array of the crs format preconditioner matrix P. I make sure that diagonal elements of P is non-zero. When solving the system, in some case this throws the error ` Zero pivot in ILU

    No diagonal value in system matrix `

    I tracked the error message in the amgcl source codes, the error message comes from the codes in ilu0.hpp:

    for(ptrdiff_t j = row_beg; j < row_end; ++j) {
                    ptrdiff_t c = A.col[j];
    
                   // Exit if diagonal is reached
                    if (c >= i) {
                        precondition(c == i, "No diagonal value in system matrix");
                        precondition(!math::is_zero((*D)[i]), "Zero pivot in ILU");
    
                        (*D)[i] = math::inverse((*D)[i]);
                        break;
                    }
                 ...
    
     }
    

    It seems to me that in the preconditioner matrix P, it cannot contains element that has column number c greater than the row number i . Am I correct? And what should I do to solve this issue? Should I modify the P to remove the element with c>i? Thanks in advance for any help!

    opened by ZhuonanLin 7
Releases(1.4.3)
  • 1.4.3(Mar 31, 2022)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 1.4.2(Jul 21, 2021)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Nov 26, 2020)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 1.3.99(Nov 9, 2019)

    • 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.

    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(May 10, 2018)

    • 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.

    Source code(tar.gz)
    Source code(zip)
    amgcl-docs-1.2.tgz(9.90 MB)
  • 1.1.0(Oct 21, 2017)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(May 16, 2017)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 0.9.1(May 4, 2017)

    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).
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(May 3, 2017)

    • 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
    Source code(tar.gz)
    Source code(zip)
  • 0.8.1(Aug 12, 2016)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Jul 6, 2016)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Nov 19, 2015)

    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.

    Source code(tar.gz)
    Source code(zip)
  • 0.6.4(Nov 19, 2015)

    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
    Source code(tar.gz)
    Source code(zip)
  • 0.6.3(Mar 11, 2015)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.2(Nov 29, 2014)

    • 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.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.1(Oct 7, 2014)

  • 0.6.0(Sep 27, 2014)

    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.
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Jun 13, 2014)

    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.

    Source code(tar.gz)
    Source code(zip)
  • 0.3.2(Jun 13, 2014)

    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:

    • Added Blaze library backend (https://code.google.com/p/blaze-lib)
    • Use Kahan summation in implementation of inner_product for the VexCL backend
    • Bug fixes and minor changes
    Source code(tar.gz)
    Source code(zip)
  • 0.3.1(Apr 15, 2014)

A large scale non-linear optimization library

Ceres Solver Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, matur

null 2.5k Aug 5, 2022
Seidel's Algorithm: Linear-Complexity Linear Programming for Small-Dimensional Variables

SDLP Seidel's Algorithm: Linear-Complexity Linear Programming (LP) for Small-Dimensions About This solver is super efficient for small-dimensional LP

ZJU FAST Lab 33 Jul 14, 2022
qpSWIFT is a light-weight sparse quadratic programming solver

qpSWIFT Light-weight sparse Quadratic Programming Solver Introduction qpSWIFT is light-weight sparse Quadratic Programming solver targetted for embedd

qpSWIFT 59 Jul 18, 2022
a lean linear math library, aimed at graphics programming. Supports vec3, vec4, mat4x4 and quaternions

linmath.h -- A small library for linear math as required for computer graphics linmath.h provides the most used types required for programming compute

datenwolf 692 Jul 28, 2022
nml is a simple matrix and linear algebra library written in standard C.

nml is a simple matrix and linear algebra library written in standard C.

Andrei Ciobanu 35 Jul 5, 2022
Library for nonconvex constrained optimization using the augmented Lagrangian method and the matrix-free PANOC algorithm.

alpaqa Alpaqa is an efficient implementation of the Augmented Lagrangian method for general nonlinear programming problems, which uses the first-order

OPTEC 12 Jul 28, 2022
A header-only C++ library for large scale eigenvalue problems

NOTE: Spectra 1.0.0 is released, with a lot of API-breaking changes. Please see the migration guide for a smooth transition to the new version. NOTE:

Yixuan Qiu 571 Jul 31, 2022
Linear Algebra in C

Linear Algebra in C Quick Start Grab la.h and use it as an stb-style header-only library. For more info on such libraries see: https://github.com/noth

Tsoding 66 Jul 24, 2022
(Python, R, C++) Library-agnostic evaluation framework for implicit-feedback recommender systems

RecoMetrics Library-agnostic evaluation framework for implicit-feedback recommender systems that are based on low-rank matrix factorization models or

null 16 Apr 19, 2022
MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).

MIRACL What is MIRACL? Multiprecision Integer and Rational Arithmetic Cryptographic Library – the MIRACL Crypto SDK – is a C software library that is

MIRACL 491 Aug 5, 2022
A C library for statistical and scientific computing

Apophenia is an open statistical library for working with data sets and statistical or simulation models. It provides functions on the same level as t

null 184 Jun 17, 2022
P(R*_{3, 0, 1}) specialized SIMD Geometric Algebra Library

Klein ?? ?? Project Site ?? ?? Description Do you need to do any of the following? Quickly? Really quickly even? Projecting points onto lines, lines t

Jeremy Ong 600 Jul 29, 2022
linalg.h is a single header, public domain, short vector math library for C++

linalg.h linalg.h is a single header, public domain, short vector math library for C++. It is inspired by the syntax of popular shading and compute la

Sterling Orsten 728 Jul 26, 2022
LibTomMath is a free open source portable number theoretic multiple-precision integer library written entirely in C.

libtommath This is the git repository for LibTomMath, a free open source portable number theoretic multiple-precision integer (MPI) library written en

libtom 523 Jul 30, 2022
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.

OpenBLAS Travis CI: AppVeyor: Drone CI: Introduction OpenBLAS is an optimized BLAS (Basic Linear Algebra Subprograms) library based on GotoBLAS2 1.13

Zhang Xianyi 4.7k Aug 1, 2022
The QuantLib C++ library

QuantLib: the free/open-source library for quantitative finance The QuantLib project (http://quantlib.org) is aimed at providing a comprehensive softw

Luigi Ballabio 3.4k Aug 9, 2022
A C++ header-only library of statistical distribution functions.

StatsLib StatsLib is a templated C++ library of statistical distribution functions, featuring unique compile-time computing capabilities and seamless

Keith O'Hara 385 Jul 26, 2022
SymEngine is a fast symbolic manipulation library, written in C++

SymEngine SymEngine is a standalone fast C++ symbolic manipulation library. Optional thin wrappers allow usage of the library from other languages, e.

null 879 Aug 5, 2022
RcppFastFloat: Rcpp Bindings for the fastfloat C++ Header-Only Library

Converting ascii text into (floating-point) numeric values is a very common problem. The fast_float header-only C++ library by Daniel Lemire does this very well, and very fast at up to or over to 1 gigabyte per second as described in more detail in a recent arXiv paper.

Dirk Eddelbuettel 18 May 2, 2022