:orphan:
# MatSolverType
String with the name of a PETSc factorization based matrix solver type. 
## Synopsis
```
typedef const char *MatSolverType;
#define MATSOLVERSUPERLU         "superlu"
#define MATSOLVERSUPERLU_DIST    "superlu_dist"
#define MATSOLVERSTRUMPACK       "strumpack"
#define MATSOLVERUMFPACK         "umfpack"
#define MATSOLVERCHOLMOD         "cholmod"
#define MATSOLVERKLU             "klu"
#define MATSOLVERSPARSEELEMENTAL "sparseelemental"
#define MATSOLVERELEMENTAL       "elemental"
#define MATSOLVERSCALAPACK       "scalapack"
#define MATSOLVERESSL            "essl"
#define MATSOLVERLUSOL           "lusol"
#define MATSOLVERMUMPS           "mumps"
#define MATSOLVERMKL_PARDISO     "mkl_pardiso"
#define MATSOLVERMKL_CPARDISO    "mkl_cpardiso"
#define MATSOLVERPASTIX          "pastix"
#define MATSOLVERMATLAB          "matlab"
#define MATSOLVERPETSC           "petsc"
#define MATSOLVERBAS             "bas"
#define MATSOLVERCUSPARSE        "cusparse"
#define MATSOLVERCUSPARSEBAND    "cusparseband"
#define MATSOLVERCUDA            "cuda"
#define MATSOLVERHIPSPARSE       "hipsparse"
#define MATSOLVERHIPSPARSEBAND   "hipsparseband"
#define MATSOLVERHIP             "hip"
#define MATSOLVERKOKKOS          "kokkos"
#define MATSOLVERKOKKOSDEVICE    "kokkosdevice"
#define MATSOLVERSPQR            "spqr"

```
For example: "petsc" indicates what PETSc provides, "superlu_dist" the parallel SuperLU_DIST package etc




## Note
`MATSOLVERUMFPACK`, `MATSOLVERCHOLMOD`, `MATSOLVERKLU`, `MATSOLVERSPQR` form the SuiteSparse package; you can use `--download-suitesparse` as
a ./configure option to install them


## See Also
 [](sec_matfactor), [](ch_matrices), `MatGetFactor()`, `PCFactorSetMatSolverType()`, `PCFactorGetMatSolverType()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscmat.h.html#MatSolverType">include/petscmat.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscmat.h)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
