Lineal: An Efficient Linear Algebra Library
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
This paper introduces Lineal, a new C++20 linear algebra library designed to solve large sparse linear systems arising from PDE discretization on attainable hardware by optimizing runtime and especially memory consumption. Lineal supports matrix-free linear systems for stencil-based problems, which can store a single value per cell to minimize memory use. This can be paired with MAMGO, Lineal’s Algebraic Multi-Grid implementation based on the algorithm used in DUNE ISTL, using a matrix-free linear system on the finest level and Compressed Sparse Row (CSR) matrices on coarser levels, drastically reducing memory consumption on the finest, and largest, level—a novel approach to our knowledge. It can additionally be combined with Lineal’s very flexible support for mixed precision to minimize memory use and the effect of reduced precision on convergence. Almost all components are fully multithreaded and many support explicit SIMD operations and/or tiling. The main evaluation—solving the stationary diffusion problem using two sets of high-resolution scans of soil samples—shows Lineal’s very good strong scaling and the effectiveness of the optimizations implemented. On the smaller dataset, Lineal outperforms hypre’s BoomerAMG, DUNE ISTL, and Ginkgo, requiring less than half the runtime and memory with CSR matrices and less than a quarter with the hybrid matrix-free approach. Only Lineal can handle the larger dataset on the test system due to its lower memory use. Additional evaluation using the SPE10 Model 2 benchmark further highlights Lineal’s strong performance and potential areas for improvement. MSC Classification: 65F10 , 65F50 , 65N22 , 65N55 , 65Y05 , 65Y15 , 65Y20