# Julia at Scale

**URL:** https://discourse.julialang.org/c/domain/parallel/34.md?page=1

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

**Page:** 2

---

## [Enable multiple Cores for Jupyter Lab](https://discourse.julialang.org/t/enable-multiple-cores-for-jupyter-lab/18658)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 12\
**Last updated:** [July 30, 2024, 8:25am UTC](https://discourse.julialang.org/t/enable-multiple-cores-for-jupyter-lab/18658 "2024-07-30T08:25:20Z")

</div>

I have found some resources on this online, but nothing which I actually is able to understand fully. I want to enable multiple cores when I run JupyterLab (also notebooks). This link (Setting JULIA\_NUM\_THREADS in an I…

---

## [Automatic Compiler Optimizations and Multithreading](https://discourse.julialang.org/t/automatic-compiler-optimizations-and-multithreading/117321)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 11\
**Last updated:** [July 24, 2024, 1:29pm UTC](https://discourse.julialang.org/t/automatic-compiler-optimizations-and-multithreading/117321 "2024-07-24T13:29:24Z")

</div>

I learned in my HPC class that for languages such as C/C++ and Fortran, invoking automatic compiler optimizations using the (gcc) -On flag could lead to unintended behaviors when compiling multithreaded programs; somethi…

---

## [Looking to parallelize (not parametrize) the solution to a large and highly stiff ODE system](https://discourse.julialang.org/t/looking-to-parallelize-not-parametrize-the-solution-to-a-large-and-highly-stiff-ode-system/116727)

<div class="topic-metadata">

**Author:** [@balaji\_sriram](https://discourse.julialang.org/u/balaji_sriram)\
**Replies:** 7\
**Last updated:** [July 13, 2024, 12:41pm UTC](https://discourse.julialang.org/t/looking-to-parallelize-not-parametrize-the-solution-to-a-large-and-highly-stiff-ode-system/116727 "2024-07-13T12:41:42Z")

</div>

I am solving a system of linear differential equations (of type \[dx/dt\]= \[Jacobian\]\*\[ x \] ) with about 1 million simultaneous differential equations. The system is highly stiff and the jacobian is sparse and banded. I us…

---

## [Suggestions for best practice in scaling analysis](https://discourse.julialang.org/t/suggestions-for-best-practice-in-scaling-analysis/114237)

<div class="topic-metadata">

**Author:** [@SamBrand](https://discourse.julialang.org/u/SamBrand)\
**Replies:** 3\
**Last updated:** [June 16, 2024, 5:16pm UTC](https://discourse.julialang.org/t/suggestions-for-best-practice-in-scaling-analysis/114237 "2024-06-16T17:16:00Z")

</div>

Hi everyone, I’m exploring whether there are good examples around of using Julia at scale that people can link? At the moment I’m helping develop a package for model-based epidemiological inference Rt-without-renewal/E…

---

## [Sys.CPU\_THREADS doesn't appear to get all my threads on Mac](https://discourse.julialang.org/t/sys-cpu-threads-doesnt-appear-to-get-all-my-threads-on-mac/115613)

<div class="topic-metadata">

**Author:** [@schwob](https://discourse.julialang.org/u/schwob)\
**Replies:** 4\
**Last updated:** [June 13, 2024, 6:57pm UTC](https://discourse.julialang.org/t/sys-cpu-threads-doesnt-appear-to-get-all-my-threads-on-mac/115613 "2024-06-13T18:57:10Z")

</div>

On my Mac computer, Sys.CPU\_THREADS=16, but in the terminal, sysctl -n hw.ncpu=24, which really implies I have 48 threads. I’m trying to use Distributed’s addprocs()=addprocs(Sys.CPU\_THREADS) command, but it seems to not…

---

## [\[ANN\] Training course “Julia for HPC” in Stuttgart, Germany on Sept 10-13, 2024](https://discourse.julialang.org/t/ann-training-course-julia-for-hpc-in-stuttgart-germany-on-sept-10-13-2024/115311)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 0\
**Last updated:** [June 7, 2024, 7:44am UTC](https://discourse.julialang.org/t/ann-training-course-julia-for-hpc-in-stuttgart-germany-on-sept-10-13-2024/115311 "2024-06-07T07:44:13Z")

</div>

After the great positive feedback of the last two years, there will be another opportunity to learn more about using Julia for high-performance computing this fall! In collaboration with the High-Performance Computing C…

---

## [Understanding parallelization of composite types](https://discourse.julialang.org/t/understanding-parallelization-of-composite-types/115077)

<div class="topic-metadata">

**Author:** [@michael2](https://discourse.julialang.org/u/michael2)\
**Replies:** 0\
**Last updated:** [June 2, 2024, 11:46am UTC](https://discourse.julialang.org/t/understanding-parallelization-of-composite-types/115077 "2024-06-02T11:46:35Z")

</div>

Suppose we have a Vector{MyStruct} with the following definition: mutable struct MyStruct x::Float64 end Obviously, this is a vastly simplified example. Now, we have a function that manipulates our struct in-place…

---

## [Understanding the transition from memory bound to compute bound in ParallelStencil.jl](https://discourse.julialang.org/t/understanding-the-transition-from-memory-bound-to-compute-bound-in-parallelstencil-jl/114841)

<div class="topic-metadata">

**Author:** [@taketwicedailey](https://discourse.julialang.org/u/taketwicedailey)\
**Replies:** 3\
**Last updated:** [June 2, 2024, 8:04am UTC](https://discourse.julialang.org/t/understanding-the-transition-from-memory-bound-to-compute-bound-in-parallelstencil-jl/114841 "2024-06-02T08:04:57Z")

</div>

Hi, I am interested in using ParallelStencil.jl to perform finite differencing based simulations. I started by doing experiments with the acoustic waves app, and comparing CPU vs GPU run times. I found that for the stock…

---

## [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…

---

## [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…

---

## [HPC Cafe video](https://discourse.julialang.org/t/hpc-cafe-video/114010)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 0\
**Last updated:** [May 8, 2024, 4:31pm UTC](https://discourse.julialang.org/t/hpc-cafe-video/114010 "2024-05-08T16:31:45Z")

</div>

Marvellous video from @carstenbauer I would save this to show to any HPC types asking about Julia

---

## [Benchmark ParallelStencil & ImplicitGlobalGrid performance on cluster](https://discourse.julialang.org/t/benchmark-parallelstencil-implicitglobalgrid-performance-on-cluster/113023)

<div class="topic-metadata">

**Author:** [@svretina](https://discourse.julialang.org/u/svretina)\
**Replies:** 8\
**Last updated:** [April 23, 2024, 2:24pm UTC](https://discourse.julialang.org/t/benchmark-parallelstencil-implicitglobalgrid-performance-on-cluster/113023 "2024-04-23T14:24:30Z")

</div>

I am trying to use ParallelStencil with ImplicitGlobalGrid in order to run in parallel using multithreading as well. I have a working code solving the wave equation and I would like to measure the performance of the code…

---

## [Addprocs: specify both multithreading and active environment](https://discourse.julialang.org/t/addprocs-specify-both-multithreading-and-active-environment/80427)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 2\
**Last updated:** [April 16, 2024, 5:11pm UTC](https://discourse.julialang.org/t/addprocs-specify-both-multithreading-and-active-environment/80427 "2024-04-16T17:11:02Z")

</div>

Let’s say I want to add a process with 8 threads. This is easy: using Distributed addprocs(1, exeflags="-t 8") One can check that @fetchfrom 2 Threads.nthreads() returns 8 as expected. But, if I try to specify the env…

---

## [Running independent variable-length simulations on busy Slurm cluster](https://discourse.julialang.org/t/running-independent-variable-length-simulations-on-busy-slurm-cluster/112162)

<div class="topic-metadata">

**Author:** [@Sevi](https://discourse.julialang.org/u/Sevi)\
**Replies:** 2\
**Last updated:** [April 5, 2024, 7:40am UTC](https://discourse.julialang.org/t/running-independent-variable-length-simulations-on-busy-slurm-cluster/112162 "2024-04-05T07:40:19Z")

</div>

I’m running Julia code on a Slurm cluster, but this question is not entirely specific to Julia. I hope it’s OK to post it here anyway (I am also fine with a Julia-specific solution): Problem Suppose we have a large numb…

---

## [CSC kills the prospect of multithreading. Shouldn't Julia use CSR?](https://discourse.julialang.org/t/csc-kills-the-prospect-of-multithreading-shouldnt-julia-use-csr/102491)

<div class="topic-metadata">

**Author:** [@nvenkov1](https://discourse.julialang.org/u/nvenkov1)\
**Replies:** 47\
**Last updated:** [March 20, 2024, 7:37am UTC](https://discourse.julialang.org/t/csc-kills-the-prospect-of-multithreading-shouldnt-julia-use-csr/102491 "2024-03-20T07:37:55Z")

</div>

I recently did a rather extensive study of performance of matrix-vector (SpMV) products of sparse matrices with several different storage formats. Although I started benchmarking things in Julia, as usual, I eventually t…

---

## [Garbage collection not triggering on SLURM cluster](https://discourse.julialang.org/t/garbage-collection-not-triggering-on-slurm-cluster/95675)

<div class="topic-metadata">

**Author:** [@HKaras](https://discourse.julialang.org/u/HKaras)\
**Replies:** 6\
**Last updated:** [March 4, 2024, 12:14pm UTC](https://discourse.julialang.org/t/garbage-collection-not-triggering-on-slurm-cluster/95675 "2024-03-04T12:14:19Z")

</div>

Hi, So we are trying to run parallelised code on our SLURM based cluster however are quickly encountering large scale memory issues. The memory utilisation is much more than a single loop of code will generate suggestin…

---

## [MPI.jl + Zygote OOM on embarrassingly parallel tasks](https://discourse.julialang.org/t/mpi-jl-zygote-oom-on-embarrassingly-parallel-tasks/110622)

<div class="topic-metadata">

**Author:** [@richardr2926](https://discourse.julialang.org/u/richardr2926)\
**Replies:** 11\
**Last updated:** [March 1, 2024, 11:29pm UTC](https://discourse.julialang.org/t/mpi-jl-zygote-oom-on-embarrassingly-parallel-tasks/110622 "2024-03-01T23:29:16Z")

</div>

We have simple NN: using MPI using Zygote using CUDA using Flux using LinearAlgebra MPI.Init() comm = MPI.COMM\_WORLD rank = MPI.Comm\_rank(comm) size = MPI.Comm\_size(comm) nx, ny, nz, nt = parse.(Int, ARGS\[1:4\]) T = F…

---

## [How to determine the number of elements in RemoteChannel?](https://discourse.julialang.org/t/how-to-determine-the-number-of-elements-in-remotechannel/20143)

<div class="topic-metadata">

**Author:** [@jamm](https://discourse.julialang.org/u/jamm)\
**Replies:** 4\
**Last updated:** [February 22, 2024, 12:08pm UTC](https://discourse.julialang.org/t/how-to-determine-the-number-of-elements-in-remotechannel/20143 "2024-02-22T12:08:28Z")

</div>

Hi Community! The simple Cannel show the current number of elements directly: B = Channel(2) put!(B,"one") put!(B,"two") B Channel{Any}(sz\_max:2,sz\_curr:2) the sz\_curr is current numbers of elements in channel. In c…

---

## [Is it possible to read another Task's task\_local\_storage](https://discourse.julialang.org/t/is-it-possible-to-read-another-tasks-task-local-storage/110324)

<div class="topic-metadata">

**Author:** [@rdavis120](https://discourse.julialang.org/u/rdavis120)\
**Replies:** 1\
**Last updated:** [February 17, 2024, 2:29am UTC](https://discourse.julialang.org/t/is-it-possible-to-read-another-tasks-task-local-storage/110324 "2024-02-17T02:29:03Z")

</div>

Is it possible to read the task\_local\_storage of a Task? For example, if you were to spawn several long running child tasks and you keep the handles to the child Tasks, can another task read the storage using those hand…

---

## [I am unable to run a simple distributed.jl code on my slurm cluster](https://discourse.julialang.org/t/i-am-unable-to-run-a-simple-distributed-jl-code-on-my-slurm-cluster/109892)

<div class="topic-metadata">

**Author:** [@Shashank](https://discourse.julialang.org/u/Shashank)\
**Replies:** 11\
**Last updated:** [February 10, 2024, 4:30pm UTC](https://discourse.julialang.org/t/i-am-unable-to-run-a-simple-distributed-jl-code-on-my-slurm-cluster/109892 "2024-02-10T16:30:36Z")

</div>

I am trying to run a simple file that is pasted below: using Distributed addprocs(4) println("Number of processes: ", nprocs()) println("Number of workers: ", nworkers()) @sync @distributed for i in 1:4 sleep(1) …

---

## [Julia code becomes slower on running on supercomputers and does not scale well when parallelizing with Base.Threads](https://discourse.julialang.org/t/julia-code-becomes-slower-on-running-on-supercomputers-and-does-not-scale-well-when-parallelizing-with-base-threads/108439)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 73\
**Last updated:** [January 22, 2024, 1:21pm UTC](https://discourse.julialang.org/t/julia-code-becomes-slower-on-running-on-supercomputers-and-does-not-scale-well-when-parallelizing-with-base-threads/108439 "2024-01-22T13:21:22Z")

</div>

This question is a continuation / generalization of my previous question. My end goal is to write a parallelized code where the main time taking part is Matrix multiplication and inversion. As per the advice of @ufechner…

---

## [FFTW with @parallel seg faults](https://discourse.julialang.org/t/fftw-with-parallel-seg-faults/10590)

<div class="topic-metadata">

**Author:** [@mzilhao](https://discourse.julialang.org/u/mzilhao)\
**Replies:** 7\
**Last updated:** [January 11, 2024, 3:47pm UTC](https://discourse.julialang.org/t/fftw-with-parallel-seg-faults/10590 "2024-01-11T15:47:05Z")

</div>

hi all, I have a code that I’m trying to trivially parallelize with @parallel, but I’m getting a strange segmentation fault that I’ve tracked down to a call to FFTW.plan\_r2r. This is the simplest example that reproduces…

---

## [Slow code/ high allocations on a Google Cloud VM](https://discourse.julialang.org/t/slow-code-high-allocations-on-a-google-cloud-vm/108535)

<div class="topic-metadata">

**Author:** [@Alb3r7](https://discourse.julialang.org/u/Alb3r7)\
**Replies:** 0\
**Last updated:** [January 8, 2024, 7:40pm UTC](https://discourse.julialang.org/t/slow-code-high-allocations-on-a-google-cloud-vm/108535 "2024-01-08T19:40:12Z")

</div>

Hello, I’m trying to run my Julia (1.9) code on an C3D Google Compute Engine, but I have unusual high allocations and a slow execution compared to my local machine: Has someone any experience on using a Google Cloud …

---

## [How to improve performance in a function that repeatedly defines and multiplies matrices](https://discourse.julialang.org/t/how-to-improve-performance-in-a-function-that-repeatedly-defines-and-multiplies-matrices/108153)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 64\
**Last updated:** [January 6, 2024, 2:22pm UTC](https://discourse.julialang.org/t/how-to-improve-performance-in-a-function-that-repeatedly-defines-and-multiplies-matrices/108153 "2024-01-06T14:22:15Z")

</div>

I am trying to write a code that involves running 3 nested loops, and calling a computationally expensive function within the loop. The expense mainly comes from defining , multiplying and inverting large \[~100x100\] matr…

---

## [Incorrect output when using Base.Threads](https://discourse.julialang.org/t/incorrect-output-when-using-base-threads/108290)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 3\
**Last updated:** [January 3, 2024, 4:14pm UTC](https://discourse.julialang.org/t/incorrect-output-when-using-base-threads/108290 "2024-01-03T16:14:46Z")

</div>

I am trying to write a code which has a computationally expensive triply nested loop. I am trying to parallelize the top lop using the @threads macro from Base.Threads. The loops involve calling to two functions GFC and G…

---

## [QR decomposition on large (\>1TB) matrix](https://discourse.julialang.org/t/qr-decomposition-on-large-1tb-matrix/50552)

<div class="topic-metadata">

**Author:** [@casv2](https://discourse.julialang.org/u/casv2)\
**Replies:** 5\
**Last updated:** [December 17, 2023, 9:17pm UTC](https://discourse.julialang.org/t/qr-decomposition-on-large-1tb-matrix/50552 "2023-12-17T21:17:58Z")

</div>

I’d like to perform a QR decomposition on a large (\> 1TB) matrix. Much larger than the available memory on a single node on our HPC. My idea is to set up a DistributedArray (GitHub - JuliaParallel/DistributedArrays.jl: …

---

## [Parallelizing a code when we are evaluating a function for different parameters independently and storing in an array](https://discourse.julialang.org/t/parallelizing-a-code-when-we-are-evaluating-a-function-for-different-parameters-independently-and-storing-in-an-array/107516)

<div class="topic-metadata">

**Author:** [@Uranium238](https://discourse.julialang.org/u/Uranium238)\
**Replies:** 6\
**Last updated:** [December 14, 2023, 9:06am UTC](https://discourse.julialang.org/t/parallelizing-a-code-when-we-are-evaluating-a-function-for-different-parameters-independently-and-storing-in-an-array/107516 "2023-12-14T09:06:10Z")

</div>

I am working on a problem where we have to evaluate a function at different values of a parameter called t, each evaluation is time consuming and involves a lot of matrix-multiplication and inversion. The rough outline o…

---

## [Not seeing speed-up with Dagger.jl. Am I doing something wrong?](https://discourse.julialang.org/t/not-seeing-speed-up-with-dagger-jl-am-i-doing-something-wrong/107440)

<div class="topic-metadata">

**Author:** [@bdas123](https://discourse.julialang.org/u/bdas123)\
**Replies:** 8\
**Last updated:** [December 14, 2023, 8:16am UTC](https://discourse.julialang.org/t/not-seeing-speed-up-with-dagger-jl-am-i-doing-something-wrong/107440 "2023-12-14T08:16:07Z")

</div>

I am setting 8 CPU cores using the following code: using IJulia installkernel("Julia (8 threads)", env=Dict("JULIA\_NUM\_THREADS"=\>"8")) Threads.nthreads() I change the kernel environment of the Jupyter Notebook to th…

---

## [Distributed parallel loops](https://discourse.julialang.org/t/distributed-parallel-loops/107047)

<div class="topic-metadata">

**Author:** [@sam\_ttp](https://discourse.julialang.org/u/sam_ttp)\
**Replies:** 0\
**Last updated:** [December 2, 2023, 3:58pm UTC](https://discourse.julialang.org/t/distributed-parallel-loops/107047 "2023-12-02T15:58:55Z")

</div>

I have been trying to learn how to perform distributed parallel programming in Julia and would like to clarify some (beginner) doubts. using Distributed addprocs(4) @everywhere function foo(n) sleep(0.001) re…

---

## [How do I interpret Dagger.jl benchmark results?](https://discourse.julialang.org/t/how-do-i-interpret-dagger-jl-benchmark-results/104877)

<div class="topic-metadata">

**Author:** [@schnetter](https://discourse.julialang.org/u/schnetter)\
**Replies:** 0\
**Last updated:** [October 11, 2023, 9:38pm UTC](https://discourse.julialang.org/t/how-do-i-interpret-dagger-jl-benchmark-results/104877 "2023-10-11T21:38:28Z")

</div>

I wanted to understand the performance of Dagger.jl on my laptop and ran its benchmarks there, as described in the documentation. I ran with 1 process and 8 threads (on 8 cores). This produced this output: benchmark res…

[Previous page](https://discourse.julialang.org/c/domain/parallel/34.md)

[Next page](https://discourse.julialang.org/c/domain/parallel/34.md?page=2)
