ezp
ezp is a lightweight C++ wrapper for selected distributed solvers for linear systems.
You May Be Interested if You...
- want to solve linear systems on distributed clusters
- want to avoid the hassles of learning how to call various C/Fortran solvers
Solving a linear system shall be as easy as calling a method solver.solve(A, B).
Features
- easy to use interface
- drop-in header-only library
- standalone solver binaries that can be invoked by various callers
- implementation validated with randomly generated inputs
The following solvers are implemented.
| availability | type of matrix | operation | solver | package |
|---|---|---|---|---|
| ✅ | general (partial pivoting) | simple | PxGESV | ScaLAPACK |
| ✅ | general (partial pivoting) | expert | PxGESVX | ScaLAPACK |
| ✅ | symmetric/Hermitian positive definite | simple | PxPOSV | ScaLAPACK |
| ✅ | symmetric/Hermitian positive definite | expert | PxPOSVX | ScaLAPACK |
| ✅ | general band (partial pivoting) | simple | PxGBSV | ScaLAPACK |
| ✅ | general band (no pivoting) | simple | PxDBSV | ScaLAPACK |
| ✅ | symmetric/Hermitian positive definite band | simple | PxPBSV | ScaLAPACK |
| ✅ | sparse (one- or zero-indexing CSR format) | direct | PARDISO | MKL |
| ✅ | sparse (one-indexing COO format) | direct | MUMPS | MUMPS |
| ✅ | sparse (zero-indexing CSR format) | iterative | Lis | Lis |
[!IMPORTANT] * Use branch
masterfor development and testing. * Use branchlite-libfor integration into other projects.
Dependency
The ezp library requires C++ 20 compatible compiler.
The following drivers are needed.
- an implementation of
LAPACKandBLAS, such asOpenBLAS,MKL, etc. - an implementation of
ScaLAPACK - an implementation of
MPI, such asOpenMPI,MPICH, etc.
Example
It is assumed that the root node (rank 0) prepares the left hand side \(\(A\)\) and right hand side \(\(B\)\). The solvers distribute the matrices to available processes and solve the system, return the solution back to the master node.
The solvers are designed in such a way that all BLACS and ScaLAPACK details are hidden.
One shall prepare the matrices (on the root node) and call the solver.
The following is a typical example.
It highly resembles the sequential version of how one would typically solve a linear system.
The following is a working example.