Lis (linear algebra library)
Lis (Library of Iterative Solvers for linear systems; pronounced lis]) is a scalable parallel software library to solve discretized linear equations and eigenvalue problems that mainly arise from the numerical solution of partial differential equations using iterative methods. Although it is designed for parallel computers, the library can be used without being conscious of parallel processing.
Features
Lis provides facilities for:
- Automatic program configuration
- NUMA aware hybrid implementation with MPI and OpenMP
- Exchangeable dense and sparse matrix storage formats
- Basic linear algebra operations for dense and sparse matrices
- Parallel iterative methods for linear equations and eigenvalue problems
- Parallel preconditioners for iterative methods
- Quadruple precision floating point operations
- Performance analysis
- Command-line interface to solvers and benchmarks
Example
A C program to solve the linear equation is written as follows:
#include <stdio.h>
#include "lis_config.h"
#include "lis.h"
LIS_INT main(LIS_INT argc, char* argv[])
{
LIS_MATRIX A;
LIS_VECTOR b, x;
LIS_SOLVER solver;
LIS_INT iter;
double time;
lis_initialize(&argc, &argv);
lis_matrix_create(LIS_COMM_WORLD, &A);
lis_vector_create(LIS_COMM_WORLD, &b);
lis_vector_create(LIS_COMM_WORLD, &x);
lis_input_matrix(A, argv[1]);
lis_input_vector(b, argv[2]);
lis_vector_duplicate(A, &x);
lis_solver_create(&solver);
lis_solver_set_optionC(solver);
lis_solve(A, b, x, solver);
lis_solver_get_iter(solver, &iter);
lis_solver_get_time(solver, &time);
printf("number of iterations = %d\n", iter);
printf("elapsed time = %e\n", time);
lis_output_vector(x, LIS_FMT_MM, argv[3]);
lis_solver_destroy(solver);
lis_matrix_destroy(A);
lis_vector_destroy(b);
lis_vector_destroy(x);
lis_finalize();
return 0;
}
System requirements
Installing Lis requires a C compiler. If you wish to use the Fortran interface, a Fortran compiler is needed, and the algebraic multigrid preconditioner requires a Fortran 90 compiler. For parallel computing environments, an OpenMP or MPI library is necessary. Lis supports both the Matrix Market and Harwell-Boeing formats for importing and exporting user data.
Packages that use Lis
- Gerris
- OpenModelica
- OpenGeoSys
- SICOPOLIS
- STOMP
- Diablo
- Kiva
- Notus
- Solis
- GeMA
- openCFS
- numgeo
- freeCappuccino
- Andromeda
- Yelmo
See also
- List of numerical libraries
- Conjugate gradient method
- Biconjugate gradient stabilized method (BiCGSTAB)
- Generalized minimal residual method (GMRES)
- Eigenvalue algorithm
- Lanczos algorithm
- Arnoldi iteration
- Krylov subspace
- Multigrid method
References
External links
- Official website
- Development repository on GitHub
- Prof. Jack Dongarra's freely available linear algebra software page
- Netlib repository (Courtesy of Netlib Project)
- Fedora packages (Courtesy of Fedora Project)
- Gentoo packages (Courtesy of Gentoo Linux Project)
- AUR packages (Courtesy of Arch Linux Community)
- FreeBSD packages (Courtesy of FreeBSD Project)
- Packages for macOS (Homebrew) (Courtesy of Homebrew Project)
- Packages for macOS (MacPorts) (Courtesy of MacPorts Project)
- Packages for Windows (Courtesy of WHPC Project)
- Packages for Mingw-w64 (Courtesy of Mingw-w64 Project)
- Spack packages (Courtesy of Lawrence Livermore National Laboratory)