# Parallelizing multiple Crank–Nicolson solvers

**URL:** <https://discourse.julialang.org/t/parallelizing-multiple-crank-nicolson-solvers/56861>\
**Category:** Performance\
**Tags:** linearalgebra\
**Created:** [March 10, 2021, 9:15am UTC](https://discourse.julialang.org/t/parallelizing-multiple-crank-nicolson-solvers/56861 "2021-03-10T09:15:09Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Post date:** [March 12, 2021, 4:14pm UTC](https://discourse.julialang.org/t/parallelizing-multiple-crank-nicolson-solvers/56861/21 "2021-03-12T16:14:58Z")

</div>

Not completely related to the original question on MT scaling, but on the specific example (multiple Tridiagonal systems with the same (nc=3200) size to be solved. You can achieve a faster solution with Thomas algorithm (without pre-factorization) applied in a simd manner on blocks of systems (you have to adapt the layout). You can see these [slides](https://www.researchgate.net/publication/317845331_Portable_Vectorization_and_Parallelization_of_C_Multi-dimensional_Array_Computations_Slides) and this [paper](https://www.researchgate.net/publication/317485219_Portable_vectorization_and_parallelization_of_C_multi-dimensional_array_computations). Note that this part at least can be easily ported to GPU.

---

<div class="post-metadata">

**Author:** ![jagot](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jagot/32/12217_2.png) [@jagot](https://discourse.julialang.org/u/jagot)\
**Post date:** [March 13, 2021, 5:26am UTC](https://discourse.julialang.org/t/parallelizing-multiple-crank-nicolson-solvers/56861/22 "2021-03-13T05:26:41Z")

</div>

This seems like a highly relevant discussion: [Overhead of `Threads.@threads` - #29 by Elrod](https://discourse.julialang.org/t/overhead-of-threads-threads/53964/29)

[Previous page](https://discourse.julialang.org/t/parallelizing-multiple-crank-nicolson-solvers/56861.md?page=1)
