# Trying to parallelize using CUSOLVERRF.jl with @threads

**URL:** <https://discourse.julialang.org/t/trying-to-parallelize-using-cusolverrf-jl-with-threads/131457>\
**Category:** GPU\
**Tags:** multithreading, cuda, threads, cudajl\
**Created:** [August 7, 2025, 4:11pm UTC](https://discourse.julialang.org/t/trying-to-parallelize-using-cusolverrf-jl-with-threads/131457 "2025-08-07T16:11:04Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![yolhan\_mannes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yolhan_mannes/32/220485_2.png) [@yolhan\_mannes](https://discourse.julialang.org/u/yolhan_mannes)\
**Post date:** [August 8, 2025, 7:24am UTC](https://discourse.julialang.org/t/trying-to-parallelize-using-cusolverrf-jl-with-threads/131457/3 "2025-08-08T07:24:36Z")

</div>

You should go with Distributed.jl instead since I imagine you want to use multiple machine with gpus see [Multiple GPUs · CUDA.jl](https://cuda.juliagpu.org/stable/usage/multigpu/).  
If you do want to use multithreaded on 1 gpu (which I think will be far slower than just building the big block sparse array and use full power of your gpu on it) I think you will run out of mem really quickly (see [Multhreading & GPU memory management](https://discourse.julialang.org/t/multhreading-gpu-memory-management/116297)).

PS : Last little thing maybe you know but the code you showed isn’t thread safe

---

_[View the full topic](https://discourse.julialang.org/t/trying-to-parallelize-using-cusolverrf-jl-with-threads/131457)._
