# Is there any easy-to-use parallel linear solver in Julia?

**URL:** <https://discourse.julialang.org/t/is-there-any-easy-to-use-parallel-linear-solver-in-julia/95867>\
**Category:** Numerics\
**Tags:** question, package, linearalgebra, linearsolve\
**Created:** [March 10, 2023, 1:55pm UTC](https://discourse.julialang.org/t/is-there-any-easy-to-use-parallel-linear-solver-in-julia/95867 "2023-03-10T13:55:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maphdze](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@maphdze](https://discourse.julialang.org/u/maphdze)\
**Post date:** [March 10, 2023, 1:55pm UTC](https://discourse.julialang.org/t/is-there-any-easy-to-use-parallel-linear-solver-in-julia/95867/1 "2023-03-10T13:55:34Z")

</div>

I am wondering that if there are some easy-to-use parallel linear solvers in Julia?  
I have tried `MUMPS.jl`, but if you want to parallelize it, you have to use `MPI.jl`, then other parts of the code will be executed ‘number of cores’ times.  
I tried `Pardiso.jl` too, only with the `MKLPardisosolver()`. I found that the default number of threads of a `MKLPardisosolver` is the maximum number of threads available. If you give less number of threads to the pardiso solver, it is slower than a single threaded `MUMPS` solver. (I tested these solvers with `sprand`, just for test, iterative solvers should be more suitable in this case).  
The `IterativeSolver.jl` seems only work single threaded, `Krylov.jl` supports multi-threads by multi-threaded sparse matrix-vector products.  
So is there any easy-to-use parallel direct linear solver in Julia?  
Or is it possible to only use `MPI` for `MUMPS.jl`, not for the other part of code.  
Thanks for your help!

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [March 10, 2023, 2:13pm UTC](https://discourse.julialang.org/t/is-there-any-easy-to-use-parallel-linear-solver-in-julia/95867/2 "2023-03-10T14:13:39Z")

</div>

Have you tried

[https://docs.sciml.ai/LinearSolve/stable/solvers/solvers/#HYPRE.jl](https://docs.sciml.ai/LinearSolve/stable/solvers/solvers/#HYPRE.jl)

---

<div class="post-metadata">

**Author:** ![maphdze](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@maphdze](https://discourse.julialang.org/u/maphdze)\
**Post date:** [March 10, 2023, 2:19pm UTC](https://discourse.julialang.org/t/is-there-any-easy-to-use-parallel-linear-solver-in-julia/95867/3 "2023-03-10T14:19:53Z")

</div>

Thanks Chris! I have not noticed `HYPRE.jl` before. I will have a try.

---

<div class="post-metadata">

**Author:** ![dpo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpo/32/3335_2.png) [@dpo](https://discourse.julialang.org/u/dpo)\
**Post date:** [March 10, 2023, 2:20pm UTC](https://discourse.julialang.org/t/is-there-any-easy-to-use-parallel-linear-solver-in-julia/95867/4 "2023-03-10T14:20:14Z")

</div>

> Or is it possible to only use `MPI` for `MUMPS.jl` , not for the other part of code.

Sure. You can use MPI barriers. That’s what they’re for.

---

<div class="post-metadata">

**Author:** ![maphdze](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@maphdze](https://discourse.julialang.org/u/maphdze)\
**Post date:** [March 10, 2023, 2:21pm UTC](https://discourse.julialang.org/t/is-there-any-easy-to-use-parallel-linear-solver-in-julia/95867/5 "2023-03-10T14:21:45Z")

</div>

Thanks for your reply! I will check how to implement it. 😀

---

<div class="post-metadata">

**Author:** ![greivin](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@greivin](https://discourse.julialang.org/u/greivin)\
**Post date:** [June 3, 2024, 10:02pm UTC](https://discourse.julialang.org/t/is-there-any-easy-to-use-parallel-linear-solver-in-julia/95867/6 "2024-06-03T22:02:13Z")

</div>

Hello! How did you solve your problem in the end? were you able to find a nice linear solver?
