# How to solve Sparse linear system with scipy.sparse

**URL:** <https://fenicsproject.discourse.group/t/how-to-solve-sparse-linear-system-with-scipy-sparse/8610>\
**Category:** Uncategorized\
**Created:** [June 24, 2022, 9:13am UTC](https://fenicsproject.discourse.group/t/how-to-solve-sparse-linear-system-with-scipy-sparse/8610 "2022-06-24T09:13:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gangadhara](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@gangadhara](https://fenicsproject.discourse.group/u/gangadhara)\
**Post date:** [June 24, 2022, 9:13am UTC](https://fenicsproject.discourse.group/t/how-to-solve-sparse-linear-system-with-scipy-sparse/8610/1 "2022-06-24T09:13:16Z")

</div>

Dear sir,

I am solving the 3D problem with 60000 elements and the degrees of freedom are 2 at each node. And, the global stiffness matrix is large but sparse in our case. please suggest me fast and accurate linear solver for sparse matrix. OR GPU(paralell ) based solver.

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [June 24, 2022, 11:08am UTC](https://fenicsproject.discourse.group/t/how-to-solve-sparse-linear-system-with-scipy-sparse/8610/2 "2022-06-24T11:08:32Z")

</div>

Why not use [KSP: Linear System Solvers — PETSc v3.17.2-605-g145e647609 documentation](https://petsc.org/main/docs/manual/ksp/), which are the default solver backend of DOLFIN?

Scipy, as far as Im aware, does not do parallel distributed matrices, see for instance: [Parallelize Scipy iterative methods for linear equation systems(bicgstab) in Python - Computational Science Stack Exchange](https://scicomp.stackexchange.com/questions/36404/parallelize-scipy-iterative-methods-for-linear-equation-systemsbicgstab-in-pyt)
