# \#parallel

**URL:** https://discourse.julialang.org/tag/parallel/94.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [\[ANN\] SolarPosition.jl](https://discourse.julialang.org/t/ann-solarposition-jl/134263)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 24\
**Last updated:** [July 31, 2026, 6:59pm UTC](https://discourse.julialang.org/t/ann-solarposition-jl/134263 "2026-07-31T18:59:20Z")

</div>

I am excited to announce the release of my first public Julia package, SolarPosition.jl. TLDR SolarPosition.jl is a common interface to a variety of solar positioning algorithms which have been rewritten from scratch in…

---

## [Perf Julia@threads behind Numba@njit(parallel=True)](https://discourse.julialang.org/t/perf-julia-threads-behind-numba-njit-parallel-true/137388)

<div class="topic-metadata">

**Author:** [@cheng.wu](https://discourse.julialang.org/u/cheng.wu)\
**Replies:** 17\
**Last updated:** [June 2, 2026, 9:59am UTC](https://discourse.julialang.org/t/perf-julia-threads-behind-numba-njit-parallel-true/137388 "2026-06-02T09:59:33Z")

</div>

(This is a follow up to Julia vs Numba, having created a new discourse account) I came across this article on the performance of Julia vs Python+Numba, and this section interested me. It claims parallel Julia code is qu…

---

## [Julia vs Numba](https://discourse.julialang.org/t/julia-vs-numba/137116)

<div class="topic-metadata">

**Author:** [@lilachint](https://discourse.julialang.org/u/lilachint)\
**Replies:** 11\
**Last updated:** [May 17, 2026, 7:18am UTC](https://discourse.julialang.org/t/julia-vs-numba/137116 "2026-05-17T07:18:51Z")

</div>

I used to use Numpy+Numba for some parallel computations with @nb.njit and nb.prange in Python. How does Julia compare to that? In the Python version, I used TBB/OMP threading layers and some optimization to speed up the…

---

## [\[ANN\] AcceleratedKernels.jl - Cross-architecture parallel algorithms for Julia's GPU backends](https://discourse.julialang.org/t/ann-acceleratedkernels-jl-cross-architecture-parallel-algorithms-for-julias-gpu-backends/119698)

<div class="topic-metadata">

**Author:** [@anicusan](https://discourse.julialang.org/u/anicusan)\
**Replies:** 17\
**Last updated:** [March 3, 2026, 6:28pm UTC](https://discourse.julialang.org/t/ann-acceleratedkernels-jl-cross-architecture-parallel-algorithms-for-julias-gpu-backends/119698 "2026-03-03T18:28:45Z")

</div>

Hi everyone, I’m excited to announce the first public release of AcceleratedKernels.jl, a high-performance library of parallel algorithm building blocks for the Julia ecosystem, targeting: Multithreaded CPUs, and GPUs…

---

## [Multi-thread for nested loop with internal conditions, tricky](https://discourse.julialang.org/t/multi-thread-for-nested-loop-with-internal-conditions-tricky/135041)

<div class="topic-metadata">

**Author:** [@apolion](https://discourse.julialang.org/u/apolion)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 7:09am UTC](https://discourse.julialang.org/t/multi-thread-for-nested-loop-with-internal-conditions-tricky/135041 "2026-01-14T07:09:08Z")

</div>

Hello everyone, I am computing some interactions between systems from the results of other simulations, sort of post-processing. As noted in the code, for system 1 I have 1000 simulations (variations), system 2 has 400. …

---

## [Question about data races](https://discourse.julialang.org/t/question-about-data-races/135037)

<div class="topic-metadata">

**Author:** [@BananaMaster3](https://discourse.julialang.org/u/BananaMaster3)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 2:25am UTC](https://discourse.julialang.org/t/question-about-data-races/135037 "2026-01-14T02:25:21Z")

</div>

Say we have a struct Foo: mutable struct Foo dee::Int fee::Int = 3 end We then define an array of Foo’s arrFoo = \[Foo(1), Foo(1), Foo(2), Foo(3)\] Then we have a function that, when given foo and a specific item…

---

## [Avoiding false sharing in parallel loop without collecting](https://discourse.julialang.org/t/avoiding-false-sharing-in-parallel-loop-without-collecting/134798)

<div class="topic-metadata">

**Author:** [@oscarvdvelde](https://discourse.julialang.org/u/oscarvdvelde)\
**Replies:** 8\
**Last updated:** [December 30, 2025, 8:59pm UTC](https://discourse.julialang.org/t/avoiding-false-sharing-in-parallel-loop-without-collecting/134798 "2025-12-30T20:59:29Z")

</div>

I have this function with a parallel loop that probably can benefit from elimination of false sharing. function(t,x,y,z) per\_point\_result\_array = ... #preinitialized @tasks for c in eachindex(gridcells) …

---

## [Parallelism within Turing.jl model](https://discourse.julialang.org/t/parallelism-within-turing-jl-model/54064)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 10\
**Last updated:** [November 25, 2025, 2:08pm UTC](https://discourse.julialang.org/t/parallelism-within-turing-jl-model/54064 "2025-11-25T14:08:40Z")

</div>

Hi there, just wondering how safe it is to use Threads.@threads for loops within turing models e.g. @model function my\_func(Y) alpha ~ Normal(0,1) sigma ~ Normal(0,1) Threads.@threads for i in 1:size(Y)\[2…

---

## [Execute Function for each Julia Thread](https://discourse.julialang.org/t/execute-function-for-each-julia-thread/133889)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 6\
**Last updated:** [November 15, 2025, 7:02am UTC](https://discourse.julialang.org/t/execute-function-for-each-julia-thread/133889 "2025-11-15T07:02:36Z")

</div>

I have an external library which requires thread local resources to function. For every thread Julia creates, it must notify this library via an initialize\_thread\_local() function. Is there a way to run this code for eac…

---

## [How to make the double parallelization in the CMAEvolutionStrategy.jl?](https://discourse.julialang.org/t/how-to-make-the-double-parallelization-in-the-cmaevolutionstrategy-jl/133611)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 5\
**Last updated:** [November 3, 2025, 2:38pm UTC](https://discourse.julialang.org/t/how-to-make-the-double-parallelization-in-the-cmaevolutionstrategy-jl/133611 "2025-11-03T14:38:34Z")

</div>

Hi, I’m wondering whether it’s possible to combine parallelization inside the cost function with the parallel evaluation across the CMA-ES population (CMAEvolutionStrategy.jl). Here’s my situation: I’m optimizing mode…

---

## [Different running performance in parallelization of Threads](https://discourse.julialang.org/t/different-running-performance-in-parallelization-of-threads/133397)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 22\
**Last updated:** [October 27, 2025, 5:07pm UTC](https://discourse.julialang.org/t/different-running-performance-in-parallelization-of-threads/133397 "2025-10-27T17:07:21Z")

</div>

Hi Guys, I am running a model which use a for-loop to run on 17 independently different sites. Each site does not share memory with each other. But all of the inputs for 17 sites are collected in a list, of which the el…

---

## [Julia crashes without reporting anything when I optimize a vector of models in parallel](https://discourse.julialang.org/t/julia-crashes-without-reporting-anything-when-i-optimize-a-vector-of-models-in-parallel/131801)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 22\
**Last updated:** [October 25, 2025, 1:55am UTC](https://discourse.julialang.org/t/julia-crashes-without-reporting-anything-when-i-optimize-a-vector-of-models-in-parallel/131801 "2025-10-25T01:55:47Z")

</div>

My setting is julia\> Threads.nthreads() 4 I can’t figure out what is happening here. The behavior is julia\> parallel\_CG!(B, θ, β, μ, ν) ┌ Info: before entering @threads │ sub\_j\_vec = │ 4-element Vector{Int64}: │ …

---

## [Productive Scalable Distributed Task Scheduling Using an MPI-based Backend for Dagger](https://discourse.julialang.org/t/productive-scalable-distributed-task-scheduling-using-an-mpi-based-backend-for-dagger/131995)

<div class="topic-metadata">

**Author:** [@yanzin00](https://discourse.julialang.org/u/yanzin00)\
**Replies:** 4\
**Last updated:** [September 8, 2025, 4:45pm UTC](https://discourse.julialang.org/t/productive-scalable-distributed-task-scheduling-using-an-mpi-based-backend-for-dagger/131995 "2025-09-08T16:45:56Z")

</div>

Hello Julia Community, especially Dagger and HPC developers. I hope you are doing well this summer and have achieved your goals! I’m here to share: Dagger’s MPI Implementation status My Google Summer of Code at Julia c…

---

## [Parallel Processing and Eigenvalue calculation](https://discourse.julialang.org/t/parallel-processing-and-eigenvalue-calculation/131659)

<div class="topic-metadata">

**Author:** [@FranciscoZick](https://discourse.julialang.org/u/FranciscoZick)\
**Replies:** 2\
**Last updated:** [August 18, 2025, 9:41am UTC](https://discourse.julialang.org/t/parallel-processing-and-eigenvalue-calculation/131659 "2025-08-18T09:41:41Z")

</div>

Hey everyone, I’m not necessarily new to Julia but new to parallel processing and writing fast code. I am trying to optimize this piece of code: BLAS.set\_num\_threads(16) MAX\_CONC = 4 # limit to 4 concurrent tasks @s…

---

## [Faster MPI Integration in Dagger](https://discourse.julialang.org/t/faster-mpi-integration-in-dagger/130784)

<div class="topic-metadata">

**Author:** [@yanzin00](https://discourse.julialang.org/u/yanzin00)\
**Replies:** 9\
**Last updated:** [July 27, 2025, 7:39pm UTC](https://discourse.julialang.org/t/faster-mpi-integration-in-dagger/130784 "2025-07-27T19:39:21Z")

</div>

Hello everyone! I hope you’re all doing well as you continue developing your Julia code. I am writing this post to share my progress with the Google Summer of Code project, specifically regarding the MPI integration in D…

---

## [Dagger: Benchmarking Broadcast using send\_yield! and recv\_yield!](https://discourse.julialang.org/t/dagger-benchmarking-broadcast-using-send-yield-and-recv-yield/131081)

<div class="topic-metadata">

**Author:** [@yanzin00](https://discourse.julialang.org/u/yanzin00)\
**Replies:** 0\
**Last updated:** [July 26, 2025, 10:34pm UTC](https://discourse.julialang.org/t/dagger-benchmarking-broadcast-using-send-yield-and-recv-yield/131081 "2025-07-26T22:34:09Z")

</div>

We evaluated the new send\_yield! and recv\_yield! implementations for broadcast operations, noting significant performance improvements over the previous bcast\_yield (which used older send\_yield and recv\_yield). All tests…

---

## [ReentrantLock: generate once, or every time before \`for\`](https://discourse.julialang.org/t/reentrantlock-generate-once-or-every-time-before-for/130965)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 3\
**Last updated:** [July 23, 2025, 1:24pm UTC](https://discourse.julialang.org/t/reentrantlock-generate-once-or-every-time-before-for/130965 "2025-07-23T13:24:38Z")

</div>

I learnt about ReentrantLock in JuMP’s doc. function a\_correct\_way\_to\_build\_with\_multithreading() model = Model() @variable(model, x\[1:10\]) my\_lock = Threads.ReentrantLock() T…

---

## [How to parallelize \`lu!\` factorization?](https://discourse.julialang.org/t/how-to-parallelize-lu-factorization/130933)

<div class="topic-metadata">

**Author:** [@Leon\_Lampret](https://discourse.julialang.org/u/Leon_Lampret)\
**Replies:** 15\
**Last updated:** [July 22, 2025, 8:40pm UTC](https://discourse.julialang.org/t/how-to-parallelize-lu-factorization/130933 "2025-07-22T20:40:05Z")

</div>

I have a generic implementation of the LU factorization of a rectangular matrix: function \_swap\_col!(X, j1, j2) @inbounds begin m=size(X,1); (j1==j2 || m\<1) && return nothing; @simd for i=1:m…

---

## [Why is my parallelized running time is twice of the single run](https://discourse.julialang.org/t/why-is-my-parallelized-running-time-is-twice-of-the-single-run/130685)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 8\
**Last updated:** [July 15, 2025, 6:52pm UTC](https://discourse.julialang.org/t/why-is-my-parallelized-running-time-is-twice-of-the-single-run/130685 "2025-07-15T18:52:25Z")

</div>

Hi Guys, I am running following codes to parallelize my model running for 47 independent sites. In total the parallelization code runs for 120 seconds, but single run only costs 60 seconds…I am wondering why does the pa…

---

## [How to make parallel within the parallel?](https://discourse.julialang.org/t/how-to-make-parallel-within-the-parallel/130642)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 0\
**Last updated:** [July 11, 2025, 1:22pm UTC](https://discourse.julialang.org/t/how-to-make-parallel-within-the-parallel/130642 "2025-07-11T13:22:41Z")

</div>

Hi Guys, Right now I am running a model optimization to optimize one set of parameter for several sites (in total 47 sites). Site computation is independent with each other. I am using CMAES to minimise the cost. For no…

---

## [Read/write locks and wait/wake on atomics: are there Julia futexes?](https://discourse.julialang.org/t/read-write-locks-and-wait-wake-on-atomics-are-there-julia-futexes/130602)

<div class="topic-metadata">

**Author:** [@iago-lito](https://discourse.julialang.org/u/iago-lito)\
**Replies:** 1\
**Last updated:** [July 10, 2025, 11:08am UTC](https://discourse.julialang.org/t/read-write-locks-and-wait-wake-on-atomics-are-there-julia-futexes/130602 "2025-07-10T11:08:57Z")

</div>

I wished there was a read-write lock in Julia but I couldn’t find any. But there are atomics so I figured I could write one myself, inspiring from this (inspiring) book on the nasty-gritty low-level details of concurrenc…

---

## [Multithreading a over a double for-loop with arrays](https://discourse.julialang.org/t/multithreading-a-over-a-double-for-loop-with-arrays/130033)

<div class="topic-metadata">

**Author:** [@Menno](https://discourse.julialang.org/u/Menno)\
**Replies:** 6\
**Last updated:** [June 23, 2025, 1:54pm UTC](https://discourse.julialang.org/t/multithreading-a-over-a-double-for-loop-with-arrays/130033 "2025-06-23T13:54:16Z")

</div>

Hey there, I’m trying to multithread some elaborate test over two for-loops.The important piece of code is Threads.@threads for i in 1:length(t\_values) Threads.@threads for μ in 1:P m\_values\[μ,i\]=run\_test(i, μ, t0…

---

## [PETSC.jl MPI wrapper](https://discourse.julialang.org/t/petsc-jl-mpi-wrapper/77900)

<div class="topic-metadata">

**Author:** [@Srikumar](https://discourse.julialang.org/u/Srikumar)\
**Replies:** 8\
**Last updated:** [June 7, 2025, 3:23am UTC](https://discourse.julialang.org/t/petsc-jl-mpi-wrapper/77900 "2025-06-07T03:23:08Z")

</div>

Hello, I would love to know if someone has used PETSC wrapper in Julia for MPI? I am planning to develop a parallel code using the PETSC wrapper and would like to know how extensive the PETSC functionality is in Julia.…

---

## [How to change the number of threads?](https://discourse.julialang.org/t/how-to-change-the-number-of-threads/6169)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 10\
**Last updated:** [June 4, 2025, 3:00pm UTC](https://discourse.julialang.org/t/how-to-change-the-number-of-threads/6169 "2025-06-04T15:00:41Z")

</div>

How to change the number of threads? Currently it is one for me: julia\> Threads.nthreads() 1 Is there a function/command line flag to add more threads? Is this documented somewhere?

---

## [Timeout issues on slurm cluster](https://discourse.julialang.org/t/timeout-issues-on-slurm-cluster/58303)

<div class="topic-metadata">

**Author:** [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Replies:** 7\
**Last updated:** [June 4, 2025, 9:20am UTC](https://discourse.julialang.org/t/timeout-issues-on-slurm-cluster/58303 "2025-06-04T09:20:33Z")

</div>

I’ve been running into IOError: connect: connection timed out (ETIMEDOUT) with about half my jobs using ClusterManagers on a slurm cluster. This issue started appearing about a month ago with julia 1.3 and ClusterManager…

---

## [Redistribute workload from in-homogeneous local workers to BLAS threads](https://discourse.julialang.org/t/redistribute-workload-from-in-homogeneous-local-workers-to-blas-threads/128515)

<div class="topic-metadata">

**Author:** [@VinceNeede](https://discourse.julialang.org/u/VinceNeede)\
**Replies:** 0\
**Last updated:** [April 29, 2025, 8:56am UTC](https://discourse.julialang.org/t/redistribute-workload-from-in-homogeneous-local-workers-to-blas-threads/128515 "2025-04-29T08:56:21Z")

</div>

I have some expensive function that I’m executing on local workers, something like: @everywhere begin using LinearAlgebra BLAS.set\_num\_threads(1) function expensive\_fun() #some in-homogeneous task …

---

## [MPI.jl tasks in multiple nodes](https://discourse.julialang.org/t/mpi-jl-tasks-in-multiple-nodes/128462)

<div class="topic-metadata">

**Author:** [@kongdd](https://discourse.julialang.org/u/kongdd)\
**Replies:** 1\
**Last updated:** [April 27, 2025, 2:26pm UTC](https://discourse.julialang.org/t/mpi-jl-tasks-in-multiple-nodes/128462 "2025-04-27T14:26:12Z")

</div>

I want to submit tasks in 4 nodes, with each node 10 process. However the following script only runs on 1 node: bsub -J kongdd\_m01 \\ -o log\_all.out \\ -e log\_all.err \\ -n 40 \\ -R "span\[ptile=10\]" \\ …

---

## [Error: peer didn't connect](https://discourse.julialang.org/t/error-peer-didnt-connect/128130)

<div class="topic-metadata">

**Author:** [@liamh](https://discourse.julialang.org/u/liamh)\
**Replies:** 0\
**Last updated:** [April 16, 2025, 4:08pm UTC](https://discourse.julialang.org/t/error-peer-didnt-connect/128130 "2025-04-16T16:08:46Z")

</div>

Occasionally I get a message like this. The last time it happened, I lost all the work from a two-week computation. What causes it and how can I prevent it? Update: I have found this post and have tried setting Distribu…

---

## [\[CfP\] PAW-ATM 2025: Parallel Applications Workshop, Alternatives to MPI+X - Supercomputing 2025](https://discourse.julialang.org/t/cfp-paw-atm-2025-parallel-applications-workshop-alternatives-to-mpi-x-supercomputing-2025/128063)

<div class="topic-metadata">

**Author:** [@sloede](https://discourse.julialang.org/u/sloede)\
**Replies:** 0\
**Last updated:** [April 14, 2025, 2:27pm UTC](https://discourse.julialang.org/t/cfp-paw-atm-2025-parallel-applications-workshop-alternatives-to-mpi-x-supercomputing-2025/128063 "2025-04-14T14:27:29Z")

</div>

Call for Papers PAW-ATM 2025: Parallel Applications Workshop, Alternatives To MPI+X Held in conjunction with SC25, St. Louis, MO Submissions deadline: July 24, 2025 Notification to authors: August 30, 2025 Worksho…

---

## [Thread.jl yields wrong results in parallelisation compared to serial for-loop](https://discourse.julialang.org/t/thread-jl-yields-wrong-results-in-parallelisation-compared-to-serial-for-loop/127239)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 7\
**Last updated:** [March 21, 2025, 8:09pm UTC](https://discourse.julialang.org/t/thread-jl-yields-wrong-results-in-parallelisation-compared-to-serial-for-loop/127239 "2025-03-21T20:09:52Z")

</div>

Hi Guys, I am using @thread for my model parallelisation. However, it yields different results compared to serial for-loop. Here is my script function batch\_cost\_function(p) num\_params = size(p, 2) # Number of para…

[Next page](https://discourse.julialang.org/tag/parallel/94.md?match_all_tags=true&page=1&tags%5B%5D=parallel)
