# \#distributed

**URL:** https://discourse.julialang.org/tag/distributed/185.md?match_all_tags=true&page=1&tags%5B%5D=distributed

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

**Page:** 2

---

## [Parallel computation to speed up for loops](https://discourse.julialang.org/t/parallel-computation-to-speed-up-for-loops/126006)

<div class="topic-metadata">

**Author:** [@AP9](https://discourse.julialang.org/u/AP9)\
**Replies:** 3\
**Last updated:** [February 18, 2025, 7:00pm UTC](https://discourse.julialang.org/t/parallel-computation-to-speed-up-for-loops/126006 "2025-02-18T19:00:02Z")

</div>

I am computing the Lyapunov exponents in 2D for the system below, by doing a for loop over two parameters (ωA, A) and it takes a really long time. using Parameters, ChaosTools, DifferentialEquations, Distributed, Shared…

---

## [Help with shared arrays - code update](https://discourse.julialang.org/t/help-with-shared-arrays-code-update/125692)

<div class="topic-metadata">

**Author:** [@Fernando1](https://discourse.julialang.org/u/Fernando1)\
**Replies:** 2\
**Last updated:** [February 9, 2025, 6:13pm UTC](https://discourse.julialang.org/t/help-with-shared-arrays-code-update/125692 "2025-02-09T18:13:05Z")

</div>

Hi all, this is the same post as I had done before but with the code correctly added. I am trying to run a “Simulate” function living in a separate module and extract the states from it with a getStates function. The id…

---

## [Licensing Issues with Gurobi.jl on Cluster](https://discourse.julialang.org/t/licensing-issues-with-gurobi-jl-on-cluster/125270)

<div class="topic-metadata">

**Author:** [@Sunash\_Sharma](https://discourse.julialang.org/u/Sunash_Sharma)\
**Replies:** 3\
**Last updated:** [January 27, 2025, 9:37pm UTC](https://discourse.julialang.org/t/licensing-issues-with-gurobi-jl-on-cluster/125270 "2025-01-27T21:37:45Z")

</div>

TL;DR: Is there a way to use Gurobi.jl and distributed algorithms from StochasticPrograms.jl in a way that works on a cluster, given that StochasticPrograms.jl requires JuMP.jl version 1.2.1? Hi everyone, I’m planning …

---

## [Why did I get IO error when broadcasting higher precision (bits \>= 98) ArbFloat variables to workers?](https://discourse.julialang.org/t/why-did-i-get-io-error-when-broadcasting-higher-precision-bits-98-arbfloat-variables-to-workers/124025)

<div class="topic-metadata">

**Author:** [@Edsnowden233](https://discourse.julialang.org/u/Edsnowden233)\
**Replies:** 6\
**Last updated:** [December 24, 2024, 7:43am UTC](https://discourse.julialang.org/t/why-did-i-get-io-error-when-broadcasting-higher-precision-bits-98-arbfloat-variables-to-workers/124025 "2024-12-24T07:43:49Z")

</div>

I used the following code to test the data allocation on distributed workers. I found that broadcasting an ArbFloat variable to workers with precision equal to or higher than 98 bits will cause the IO error. Code: usi…

---

## [Distributed ODE solving](https://discourse.julialang.org/t/distributed-ode-solving/123569)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 5\
**Last updated:** [December 10, 2024, 2:25pm UTC](https://discourse.julialang.org/t/distributed-ode-solving/123569 "2024-12-10T14:25:54Z")

</div>

Hi all, I am interested in been able to manually solve ODEs distributed as below. I am aware of ensembledistributed() however I want greater control over the outcome of each trajectory. My thinking is then to solve a se…

---

## [Addprocs\_slurm not connecting to all available workers](https://discourse.julialang.org/t/addprocs-slurm-not-connecting-to-all-available-workers/123149)

<div class="topic-metadata">

**Author:** [@jewh](https://discourse.julialang.org/u/jewh)\
**Replies:** 7\
**Last updated:** [December 4, 2024, 7:17am UTC](https://discourse.julialang.org/t/addprocs-slurm-not-connecting-to-all-available-workers/123149 "2024-12-04T07:17:47Z")

</div>

I’m using Distributed and ClusterManagers to run large numbers of simulations in parallel on my university HPC cluster. Scheduling and job management on the cluster is handled by Slurm. I initialise each of the parallel…

---

## [Why can Julia spawn new processes but not new threads?](https://discourse.julialang.org/t/why-can-julia-spawn-new-processes-but-not-new-threads/123267)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 1\
**Last updated:** [November 30, 2024, 5:10am UTC](https://discourse.julialang.org/t/why-can-julia-spawn-new-processes-but-not-new-threads/123267 "2024-11-30T05:10:57Z")

</div>

With Distributed.jl, you can create new worker processes easily with addprocs (each of which can have multiple threads), but once a Julia process starts you can’t add more threads to that process; why?

---

## [Unexpected behavior of package loading in workers using Distributed](https://discourse.julialang.org/t/unexpected-behavior-of-package-loading-in-workers-using-distributed/122814)

<div class="topic-metadata">

**Author:** [@HanD](https://discourse.julialang.org/u/HanD)\
**Replies:** 7\
**Last updated:** [November 27, 2024, 10:32am UTC](https://discourse.julialang.org/t/unexpected-behavior-of-package-loading-in-workers-using-distributed/122814 "2024-11-27T10:32:55Z")

</div>

The following phenomenon gave me quite a headache and took me a while to track down. Take the following example (using Julia 1.11.1 or 1.10.6, probably older ones as well): julia\> using Distributed, Statistics julia\> a…

---

## [DataFrames and MLJ](https://discourse.julialang.org/t/dataframes-and-mlj/122847)

<div class="topic-metadata">

**Author:** [@Jose\_Ghislain\_Quenum](https://discourse.julialang.org/u/Jose_Ghislain_Quenum)\
**Replies:** 4\
**Last updated:** [November 24, 2024, 7:04pm UTC](https://discourse.julialang.org/t/dataframes-and-mlj/122847 "2024-11-24T19:04:31Z")

</div>

Hi all, I am experiencing a weird behavior from Pluto. I have a dataset that contains more than 1M observations, although the size is about 75M. I’ve been able to cleanup the dataset and address the missing values. Howe…

---

## [Get process id from worker id](https://discourse.julialang.org/t/get-process-id-from-worker-id/122315)

<div class="topic-metadata">

**Author:** [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Replies:** 0\
**Last updated:** [November 6, 2024, 2:51am UTC](https://discourse.julialang.org/t/get-process-id-from-worker-id/122315 "2024-11-06T02:51:54Z")

</div>

Is there an easy way to get, from the worker id, the process id? I could do # length(workers()) == 1039 \[remotecall\_fetch(getpid, w\_id) for w\_id in workers()\] but is there a way to do this on worker 1 without fetching…

---

## [Lack of improvement from distributed pmap, understanding a simple example](https://discourse.julialang.org/t/lack-of-improvement-from-distributed-pmap-understanding-a-simple-example/121880)

<div class="topic-metadata">

**Author:** [@ma-y](https://discourse.julialang.org/u/ma-y)\
**Replies:** 6\
**Last updated:** [October 29, 2024, 2:25pm UTC](https://discourse.julialang.org/t/lack-of-improvement-from-distributed-pmap-understanding-a-simple-example/121880 "2024-10-29T14:25:31Z")

</div>

Dear all, I am relatively new to Julia and have spent the last weeks trying to parallelize my code, without much success. Therefore I would like to understand the following minimal example. My computer has 16 cores, an…

---

## [Configure Slurm File for Parallelization](https://discourse.julialang.org/t/configure-slurm-file-for-parallelization/121239)

<div class="topic-metadata">

**Author:** [@benjamin.nunez](https://discourse.julialang.org/u/benjamin.nunez)\
**Replies:** 4\
**Last updated:** [October 13, 2024, 7:41pm UTC](https://discourse.julialang.org/t/configure-slurm-file-for-parallelization/121239 "2024-10-13T19:41:57Z")

</div>

Hello everyone! I am using a computer cluster to parallelize the execution of my Julia code. The partition I am using has a total of 14 nodes, and my goal is to connect to this partition and execute my main.jl file, wh…

---

## [Is \`put!\` of a \`RemoteChannel\` thread-safe](https://discourse.julialang.org/t/is-put-of-a-remotechannel-thread-safe/120866)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 0\
**Last updated:** [October 3, 2024, 6:18pm UTC](https://discourse.julialang.org/t/is-put-of-a-remotechannel-thread-safe/120866 "2024-10-03T18:18:36Z")

</div>

Hello, I have the following RemoteChannel channel = RemoteChannel(() -\> Channel{Bool}(), 1) Is the put!(channel, true) action thread-safe?

---

## [CUDA performing scalar indexing when used along with Distributed](https://discourse.julialang.org/t/cuda-performing-scalar-indexing-when-used-along-with-distributed/119470)

<div class="topic-metadata">

**Author:** [@Paulo\_Refosco](https://discourse.julialang.org/u/Paulo_Refosco)\
**Replies:** 5\
**Last updated:** [September 23, 2024, 3:28pm UTC](https://discourse.julialang.org/t/cuda-performing-scalar-indexing-when-used-along-with-distributed/119470 "2024-09-23T15:28:07Z")

</div>

Hello all! I am running a series of nested functions, some of which using CUDA.jl at high level CuArrays processing (dot products and/or matrix multiplications). When I run it single threaded it works perfectly (even if…

---

## [Understanding data movement with Distributed.jl](https://discourse.julialang.org/t/understanding-data-movement-with-distributed-jl/100680)

<div class="topic-metadata">

**Author:** [@lmtzx9h4qqnt](https://discourse.julialang.org/u/lmtzx9h4qqnt)\
**Replies:** 1\
**Last updated:** [September 2, 2024, 11:00pm UTC](https://discourse.julialang.org/t/understanding-data-movement-with-distributed-jl/100680 "2024-09-02T23:00:02Z")

</div>

As outlined in the manual, Multi-processing and Distributed Computing · The Julia Language, Distributed.jl performs “implicit” data movement operations between the different processes. Unfortunately, that page doesn’t re…

---

## [Running a function over multiple nodes on a julia cluster, from within a julia script](https://discourse.julialang.org/t/running-a-function-over-multiple-nodes-on-a-julia-cluster-from-within-a-julia-script/118153)

<div class="topic-metadata">

**Author:** [@eveningsilverfox](https://discourse.julialang.org/u/eveningsilverfox)\
**Replies:** 5\
**Last updated:** [August 14, 2024, 3:27pm UTC](https://discourse.julialang.org/t/running-a-function-over-multiple-nodes-on-a-julia-cluster-from-within-a-julia-script/118153 "2024-08-14T15:27:56Z")

</div>

I have a function whose skeleton looks like this: function inner(a,ij) return a\*ij; end function outer(a,N) arr = zeros(ComplexF64, N); for ij = 1:N arr\[ij\] = inner(a,ij); end return sum(arr) end…

---

## [How to improve the scaling of Julia code aimed at multi-node parallelization?](https://discourse.julialang.org/t/how-to-improve-the-scaling-of-julia-code-aimed-at-multi-node-parallelization/118048)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 38\
**Last updated:** [August 14, 2024, 8:56am UTC](https://discourse.julialang.org/t/how-to-improve-the-scaling-of-julia-code-aimed-at-multi-node-parallelization/118048 "2024-08-14T08:56:08Z")

</div>

I have been trying to write a version of my Julia code that can be run in a parallelized manner using multiple nodes at once. After posting this thread I finally have a working version of the code (as given below) Code …

---

## [Communicating across worker processes](https://discourse.julialang.org/t/communicating-across-worker-processes/118017)

<div class="topic-metadata">

**Author:** [@ndehngwa](https://discourse.julialang.org/u/ndehngwa)\
**Replies:** 2\
**Last updated:** [August 12, 2024, 5:30am UTC](https://discourse.julialang.org/t/communicating-across-worker-processes/118017 "2024-08-12T05:30:45Z")

</div>

Hello. I just got into julia and i could use some help. I am trying to create an application that listens for instructions form the command line and sends them to a worker process. The worker process performs some compu…

---

## [JulianCon 2024 Dagger Workshop Information](https://discourse.julialang.org/t/juliancon-2024-dagger-workshop-information/116488)

<div class="topic-metadata">

**Author:** [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Replies:** 5\
**Last updated:** [August 6, 2024, 4:03pm UTC](https://discourse.julialang.org/t/juliancon-2024-dagger-workshop-information/116488 "2024-08-06T16:03:12Z")

</div>

Hey all! I wanted to send out a bit of important information relating to the Dagger Workshop this year, to make sure anyone who plans to attend has a maximally enjoyable session :smile: Primarily, please have an up-to-…

---

## [Probable data race condition causing problems when trying to parallelize a loop used to populate an array](https://discourse.julialang.org/t/probable-data-race-condition-causing-problems-when-trying-to-parallelize-a-loop-used-to-populate-an-array/117733)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 14\
**Last updated:** [August 4, 2024, 9:35am UTC](https://discourse.julialang.org/t/probable-data-race-condition-causing-problems-when-trying-to-parallelize-a-loop-used-to-populate-an-array/117733 "2024-08-04T09:35:58Z")

</div>

I am trying to parallelize a part of my code where different values of an array x are populated asynchronously. The serial function of my full code is as follows using Distributed using MKL using DelimitedFiles using Li…

---

## [Bad performances when using Multithreading and Distributed with heavy LinearAlgebra calculations](https://discourse.julialang.org/t/bad-performances-when-using-multithreading-and-distributed-with-heavy-linearalgebra-calculations/117258)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 26\
**Last updated:** [July 25, 2024, 10:59pm UTC](https://discourse.julialang.org/t/bad-performances-when-using-multithreading-and-distributed-with-heavy-linearalgebra-calculations/117258 "2024-07-25T22:59:58Z")

</div>

Hello, I have noticed that Julia multithreading and Distributed scale very badly when calculating relatively heavy computations involving BLAS and LAPACK. As an example, here I show you the calculation of the expv funct…

---

## [@everywhere works, sort of](https://discourse.julialang.org/t/everywhere-works-sort-of/116746)

<div class="topic-metadata">

**Author:** [@ilovemath](https://discourse.julialang.org/u/ilovemath)\
**Replies:** 2\
**Last updated:** [July 8, 2024, 6:29am UTC](https://discourse.julialang.org/t/everywhere-works-sort-of/116746 "2024-07-08T06:29:36Z")

</div>

I am working on setting up a parallel code, and I am putting in one piece at a time to make sure I actually understand how to do this properly. Primarily, I put the following piece of code in to Julia on the front end o…

---

## [Distributed computing or Multi-threading on Optimization](https://discourse.julialang.org/t/distributed-computing-or-multi-threading-on-optimization/116147)

<div class="topic-metadata">

**Author:** [@benjamin.nunez](https://discourse.julialang.org/u/benjamin.nunez)\
**Replies:** 1\
**Last updated:** [June 24, 2024, 7:05pm UTC](https://discourse.julialang.org/t/distributed-computing-or-multi-threading-on-optimization/116147 "2024-06-24T19:05:21Z")

</div>

Hello! I am currently working on an algorithm to solve stochastic optimization problems by decomposing them into scenarios (very similar to Progressive Hedging). I am not very knowledgeable in the area of task parallel…

---

## [Huge distributed overhead](https://discourse.julialang.org/t/huge-distributed-overhead/115815)

<div class="topic-metadata">

**Author:** [@greivin](https://discourse.julialang.org/u/greivin)\
**Replies:** 2\
**Last updated:** [June 19, 2024, 11:46am UTC](https://discourse.julialang.org/t/huge-distributed-overhead/115815 "2024-06-19T11:46:17Z")

</div>

My code looks something like this. First, I have a file where I define my functions #Functions.jl file #Here we import the relevant packages and define all the functions with @everywere @everywhere Solver(A, N) …

---

## [Environment activation using distributed](https://discourse.julialang.org/t/environment-activation-using-distributed/115773)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 0\
**Last updated:** [June 17, 2024, 5:53pm UTC](https://discourse.julialang.org/t/environment-activation-using-distributed/115773 "2024-06-17T17:53:28Z")

</div>

Is it normal for the environment activation to take more than 10 minutes using @everywhere? In my case, all processes are on the same machine. They all activate the same environment. When doing this in an interactive …

---

## [Distributed performance depends on the number of workers?](https://discourse.julialang.org/t/distributed-performance-depends-on-the-number-of-workers/115514)

<div class="topic-metadata">

**Author:** [@greivin](https://discourse.julialang.org/u/greivin)\
**Replies:** 0\
**Last updated:** [June 11, 2024, 9:01pm UTC](https://discourse.julialang.org/t/distributed-performance-depends-on-the-number-of-workers/115514 "2024-06-11T21:01:09Z")

</div>

I’m executing a code that solves a linear system (Ax = b) for a fixed matrix A, and for several vectors b\_i here i runs from 1 to N. I set N to match the number of available cores in my system, therefore I’ll be solving …

---

## [Confusing behaviour of include("source.jl") in parallel codes](https://discourse.julialang.org/t/confusing-behaviour-of-include-source-jl-in-parallel-codes/115295)

<div class="topic-metadata">

**Author:** [@singularity](https://discourse.julialang.org/u/singularity)\
**Replies:** 6\
**Last updated:** [June 7, 2024, 6:40pm UTC](https://discourse.julialang.org/t/confusing-behaviour-of-include-source-jl-in-parallel-codes/115295 "2024-06-07T18:40:46Z")

</div>

Julia’s rules when writing parallelized codes have caused a lot of frustration since I started using Julia many years ago. I have encountered another issue today. When using @everywhere workers() with the include("source…

---

## [Initializing local variables on workers without using excessive memory](https://discourse.julialang.org/t/initializing-local-variables-on-workers-without-using-excessive-memory/114713)

<div class="topic-metadata">

**Author:** [@lgo](https://discourse.julialang.org/u/lgo)\
**Replies:** 1\
**Last updated:** [May 29, 2024, 10:55am UTC](https://discourse.julialang.org/t/initializing-local-variables-on-workers-without-using-excessive-memory/114713 "2024-05-29T10:55:48Z")

</div>

I’m using Julia and JuMP to solve a massive optimization problem with decomposition on a HPC. For this purpose, I want to initialize an independent optimization problem on each worker and then solve it repeatedly. So far…

---

## [\`KeyError\` when using \`pmap\`](https://discourse.julialang.org/t/keyerror-when-using-pmap/114464)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 3\
**Last updated:** [May 20, 2024, 3:42am UTC](https://discourse.julialang.org/t/keyerror-when-using-pmap/114464 "2024-05-20T03:42:19Z")

</div>

I’m trying to use pmap form Distributed.jl for parallel computing in the runtests.jl file of a package (MyPkg) that is in development. The code is like: # runtests.jl using Distributed: @everywhere, addprocs, pmap usin…

---

## [How to convert a thread-parallelized code into a core-parallelized code?](https://discourse.julialang.org/t/how-to-convert-a-thread-parallelized-code-into-a-core-parallelized-code/114406)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 3\
**Last updated:** [May 19, 2024, 7:06am UTC](https://discourse.julialang.org/t/how-to-convert-a-thread-parallelized-code-into-a-core-parallelized-code/114406 "2024-05-19T07:06:44Z")

</div>

This post can be thought as a successor to an old series of posts that I had made where the motive was to improve the performance and eventually parallelize a code that consisted primarily of matrix operations, the end g…

[Previous page](https://discourse.julialang.org/tag/distributed/185.md?match_all_tags=true&tags%5B%5D=distributed)

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