# \#slurm

**URL:** https://discourse.julialang.org/tag/slurm/1049.md

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

---

## [Number of threads assigned via SLURM](https://discourse.julialang.org/t/number-of-threads-assigned-via-slurm/136820)

<div class="topic-metadata">

**Author:** [@pulk\_jain](https://discourse.julialang.org/u/pulk_jain)\
**Replies:** 5\
**Last updated:** [April 24, 2026, 4:50am UTC](https://discourse.julialang.org/t/number-of-threads-assigned-via-slurm/136820 "2026-04-24T04:50:26Z")

</div>

I am trying to run some multi-threaded code on a cluster using SLURM. #SBATCH --cpus-per-task=4 JPATH=$HOME/.juliaup/bin export JULIA\_DEPOT\_PATH="/my/storage/dir/.julia:" export JULIA\_NUM\_THREADS=auto $JPATH/julia main\_…

---

## [Relation between BLAS.get\_num\_threads() and SLURM\_CPUS\_PER\_TASK](https://discourse.julialang.org/t/relation-between-blas-get-num-threads-and-slurm-cpus-per-task/134199)

<div class="topic-metadata">

**Author:** [@mancolric](https://discourse.julialang.org/u/mancolric)\
**Replies:** 2\
**Last updated:** [November 29, 2025, 11:58am UTC](https://discourse.julialang.org/t/relation-between-blas-get-num-threads-and-slurm-cpus-per-task/134199 "2025-11-29T11:58:36Z")

</div>

I am running the script MWE.jl using LinearAlgebra display(BLAS.get\_num\_threads()) via SLURM command srun --nodes=1 --ntasks-per-node=1 --cpus-per-task=6 --mem=1G julia MWE.jl As far as I know, for SLURM the CPUs ar…

---

## [What is the correct way to use multiple GPUs in Slurm cluster?](https://discourse.julialang.org/t/what-is-the-correct-way-to-use-multiple-gpus-in-slurm-cluster/131740)

<div class="topic-metadata">

**Author:** [@ytdHuang](https://discourse.julialang.org/u/ytdHuang)\
**Replies:** 0\
**Last updated:** [August 20, 2025, 3:52pm UTC](https://discourse.julialang.org/t/what-is-the-correct-way-to-use-multiple-gpus-in-slurm-cluster/131740 "2025-08-20T15:52:11Z")

</div>

Hello Julia community, I am trying to distribute my computation using multiple GPUs in Slurm cluster. The code can be executed correctly while I’m using single GPU board in Slurm. However, when I try to use more than on…

---

## [Memory problem when using SlurmClusterManager.jl to add workers](https://discourse.julialang.org/t/memory-problem-when-using-slurmclustermanager-jl-to-add-workers/131039)

<div class="topic-metadata">

**Author:** [@CeterisPartybus](https://discourse.julialang.org/u/CeterisPartybus)\
**Replies:** 6\
**Last updated:** [July 28, 2025, 5:32pm UTC](https://discourse.julialang.org/t/memory-problem-when-using-slurmclustermanager-jl-to-add-workers/131039 "2025-07-28T17:32:11Z")

</div>

I am new to using Distributed.jl on a cluster. I am trying to run jobs on a cluster with multiple nodes. Even though I specify a single node my Julia program should run on in the batch file, there seems to be a problem t…

---

## [Julia SLURM + BLAS + Multithreading, threads not mapping well leading to poor performance](https://discourse.julialang.org/t/julia-slurm-blas-multithreading-threads-not-mapping-well-leading-to-poor-performance/130188)

<div class="topic-metadata">

**Author:** [@jacksonjhayes](https://discourse.julialang.org/u/jacksonjhayes)\
**Replies:** 5\
**Last updated:** [June 25, 2025, 5:04pm UTC](https://discourse.julialang.org/t/julia-slurm-blas-multithreading-threads-not-mapping-well-leading-to-poor-performance/130188 "2025-06-25T17:04:36Z")

</div>

I am running benchmarking of a code that uses: multithreading BLAS (multithreaded) BLAS (single threaded in parallel on Julia Threads) on NERSC Perlmutter (AMD 2x \[AMD EPYC 7763\] 64 cores x 2 hyperthreads per core) …

---

## [SlurmClusterManagers timeout](https://discourse.julialang.org/t/slurmclustermanagers-timeout/130038)

<div class="topic-metadata">

**Author:** [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Replies:** 2\
**Last updated:** [June 19, 2025, 6:59pm UTC](https://discourse.julialang.org/t/slurmclustermanagers-timeout/130038 "2025-06-19T18:59:30Z")

</div>

Hello, I have been trying to run some jobs on a Slurm cluster (specifically, the canadian Narval Cluster of the Research Digital Alliance). Possibly due to my inexperience with it, I encountered some issues (I am not o…

---

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

---

## [SLURM manager: one node with multiple tasks](https://discourse.julialang.org/t/slurm-manager-one-node-with-multiple-tasks/124173)

<div class="topic-metadata">

**Author:** [@kerim](https://discourse.julialang.org/u/kerim)\
**Replies:** 2\
**Last updated:** [December 28, 2024, 11:45am UTC](https://discourse.julialang.org/t/slurm-manager-one-node-with-multiple-tasks/124173 "2024-12-28T11:45:25Z")

</div>

Hi, I have access to a single node with many 24 cores. I want Julia to treat that node as 4 workers with 6 cores per each worker. My attempt is: using Distributed, ClusterManagers addprocs(SlurmManager(1), nodes=1, n…

---

## [Running A Julia Script Through SLURM](https://discourse.julialang.org/t/running-a-julia-script-through-slurm/123268)

<div class="topic-metadata">

**Author:** [@leespen1](https://discourse.julialang.org/u/leespen1)\
**Replies:** 4\
**Last updated:** [December 15, 2024, 3:26am UTC](https://discourse.julialang.org/t/running-a-julia-script-through-slurm/123268 "2024-12-15T03:26:46Z")

</div>

I have a julia script that run a physics simulation. The physics simulation takes around 8 hours, and I want to run it with many random initial conditions, so I planned to run the script multiple times using a SLURM job …

---

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

---

## [Distributed computing over SLURM array](https://discourse.julialang.org/t/distributed-computing-over-slurm-array/119574)

<div class="topic-metadata">

**Author:** [@tb877](https://discourse.julialang.org/u/tb877)\
**Replies:** 11\
**Last updated:** [September 20, 2024, 3:04pm UTC](https://discourse.julialang.org/t/distributed-computing-over-slurm-array/119574 "2024-09-20T15:04:14Z")

</div>

Hi, New to Julia, and also new to SLURM. I’m thinking about the following workflow for my project and would like to see if it seems a sensible strategy, especially considering the specificities of the Julia language. I…

---

## [Writing parallel worker output to .out file in slurm to track progress](https://discourse.julialang.org/t/writing-parallel-worker-output-to-out-file-in-slurm-to-track-progress/119092)

<div class="topic-metadata">

**Author:** [@pulk\_jain](https://discourse.julialang.org/u/pulk_jain)\
**Replies:** 0\
**Last updated:** [September 5, 2024, 10:21pm UTC](https://discourse.julialang.org/t/writing-parallel-worker-output-to-out-file-in-slurm-to-track-progress/119092 "2024-09-05T22:21:50Z")

</div>

I am solving an ODE with different initial conditions using EnsembleDistributed on a cluster. I’d like to track the progress of the ensemble calculations. To do that, I wrote the following output and reduction functions: …

---

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

---

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

---

## [Julia Slurm Cluster Module Command Not Working](https://discourse.julialang.org/t/julia-slurm-cluster-module-command-not-working/113600)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 7\
**Last updated:** [May 1, 2024, 3:13am UTC](https://discourse.julialang.org/t/julia-slurm-cluster-module-command-not-working/113600 "2024-05-01T03:13:11Z")

</div>

Hello, I am experimenting with using Julia as my interpreter for slurm run scripts. But I am having an issue and I am hoping someone has run into this before. For reference, my cluster uses Lmod. As part of my run scri…

---

## [Multithreading problems in running Julia in a Slurm cluster](https://discourse.julialang.org/t/multithreading-problems-in-running-julia-in-a-slurm-cluster/112826)

<div class="topic-metadata">

**Author:** [@maphdze](https://discourse.julialang.org/u/maphdze)\
**Replies:** 8\
**Last updated:** [April 18, 2024, 7:34am UTC](https://discourse.julialang.org/t/multithreading-problems-in-running-julia-in-a-slurm-cluster/112826 "2024-04-18T07:34:03Z")

</div>

Hi! I am confused about running Julia code in a Slurm cluster. I am solving a nonlinear PDE so I have to solve it step by step. In each step a linear equation system Ax=b (from FEM so A is sparse) is solved by \\ which …

---

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

---

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

---

## [Code after @sync gets executed while @async blocks are still running](https://discourse.julialang.org/t/code-after-sync-gets-executed-while-async-blocks-are-still-running/108854)

<div class="topic-metadata">

**Author:** [@novalex98](https://discourse.julialang.org/u/novalex98)\
**Replies:** 3\
**Last updated:** [January 16, 2024, 9:15am UTC](https://discourse.julialang.org/t/code-after-sync-gets-executed-while-async-blocks-are-still-running/108854 "2024-01-16T09:15:43Z")

</div>

I am using Distributed.jl and trying to parallelize a for loop on a slurm cluster (Hyak klone at the University of Washington). I mark the loop with the @sync macro, then I enclose its insides in an @async macro. There’s…

---

## [Advice on Command Line Usage on HPC with Julia](https://discourse.julialang.org/t/advice-on-command-line-usage-on-hpc-with-julia/108176)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 6\
**Last updated:** [December 31, 2023, 3:50am UTC](https://discourse.julialang.org/t/advice-on-command-line-usage-on-hpc-with-julia/108176 "2023-12-31T03:50:50Z")

</div>

Hello, I have been working and re-working the method I use to generate and submit runs on my HPC and I’d appreciate any advice or comments on the process (I’m sure there is plenty of room for improvement). Apologies if …

---

## [CUDA.jl - MethodError: no method matching CUDA.CuArray](https://discourse.julialang.org/t/cuda-jl-methoderror-no-method-matching-cuda-cuarray/107717)

<div class="topic-metadata">

**Author:** [@maria96](https://discourse.julialang.org/u/maria96)\
**Replies:** 0\
**Last updated:** [December 16, 2023, 9:03pm UTC](https://discourse.julialang.org/t/cuda-jl-methoderror-no-method-matching-cuda-cuarray/107717 "2023-12-16T21:03:36Z")

</div>

I’m training a Neural Network using NeuralEstimators.jl in julia, and I’m submitting my code in my slurm high performance computer. For some reason, it is not working now using GPUs (it was working before) but it is work…

---

## [Troubleshooting an Unhandled error in Parallel Computation on a Slurm Cluster](https://discourse.julialang.org/t/troubleshooting-an-unhandled-error-in-parallel-computation-on-a-slurm-cluster/107427)

<div class="topic-metadata">

**Author:** [@shahmari](https://discourse.julialang.org/u/shahmari)\
**Replies:** 0\
**Last updated:** [December 11, 2023, 10:43am UTC](https://discourse.julialang.org/t/troubleshooting-an-unhandled-error-in-parallel-computation-on-a-slurm-cluster/107427 "2023-12-11T10:43:26Z")

</div>

Hello Julia community! I’m encountering an issue with distributing some computation across threads of multiple nodes in a Slurm cluster. I’m using Distributed.jl, SlurmClusterManager.jl, and SharedArrays.jl to paralleli…

---

## [HPC Slurm Logging Peer Check](https://discourse.julialang.org/t/hpc-slurm-logging-peer-check/104732)

<div class="topic-metadata">

**Author:** [@TI36XPro](https://discourse.julialang.org/u/TI36XPro)\
**Replies:** 4\
**Last updated:** [October 9, 2023, 1:05pm UTC](https://discourse.julialang.org/t/hpc-slurm-logging-peer-check/104732 "2023-10-09T13:05:21Z")

</div>

Hello, I am looking for some help understanding what is probably a familiar problem to those who run Julia regularly on an HPC with Slurm. I’ll explain the issue and then share what I’ve found. Hopefully someone can hel…

---

## [Memory issues using command line argument](https://discourse.julialang.org/t/memory-issues-using-command-line-argument/100590)

<div class="topic-metadata">

**Author:** [@Atasattari](https://discourse.julialang.org/u/Atasattari)\
**Replies:** 4\
**Last updated:** [June 20, 2023, 6:29pm UTC](https://discourse.julialang.org/t/memory-issues-using-command-line-argument/100590 "2023-06-20T18:29:56Z")

</div>

Hi, I’m trying to run a script on a cluster for different input parameters. Instead of submitting scripts with hard-coded values, I’m trying to use command-line arguments. My code works fine when the values are hard-cod…

---

## [Extend distributed pmap to mutliple nodes using SLURM](https://discourse.julialang.org/t/extend-distributed-pmap-to-mutliple-nodes-using-slurm/98263)

<div class="topic-metadata">

**Author:** [@psterzinger](https://discourse.julialang.org/u/psterzinger)\
**Replies:** 2\
**Last updated:** [May 3, 2023, 5:07pm UTC](https://discourse.julialang.org/t/extend-distributed-pmap-to-mutliple-nodes-using-slurm/98263 "2023-05-03T17:07:48Z")

</div>

I have a program that makes use of the parallelism offered by the Distributed’s pmap() function. I can run this on a cluster using one node and multiple cores. Now I would like to extend this to using multiple cores. Th…

---

## [How to avoid recompiling when using job array on a cluster](https://discourse.julialang.org/t/how-to-avoid-recompiling-when-using-job-array-on-a-cluster/88126)

<div class="topic-metadata">

**Author:** [@neuro\_enthusiast](https://discourse.julialang.org/u/neuro_enthusiast)\
**Replies:** 8\
**Last updated:** [October 2, 2022, 11:09pm UTC](https://discourse.julialang.org/t/how-to-avoid-recompiling-when-using-job-array-on-a-cluster/88126 "2022-10-02T23:09:34Z")

</div>

Hi all, I am trying to run MCMC sampling for a model built with Turing.jl. Since different chains can be sampled in parallel using multiple processes, I want to use the following line: # some lines in my code, model\_si…

---

## [Struggling to Run Distributed I/O Operations on SLURM Cluster](https://discourse.julialang.org/t/struggling-to-run-distributed-i-o-operations-on-slurm-cluster/84075)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 1\
**Last updated:** [July 12, 2022, 12:40am UTC](https://discourse.julialang.org/t/struggling-to-run-distributed-i-o-operations-on-slurm-cluster/84075 "2022-07-12T00:40:18Z")

</div>

Hi all, Problem Background I have been struggling a couple days to understand parallel and distributed computing on a remote cluster that runs SLURM. I have 100s of huge files that I need to extract information from an…

---

## [A few resources to help enable using Distributed.jl on a SLURM cluster](https://discourse.julialang.org/t/a-few-resources-to-help-enable-using-distributed-jl-on-a-slurm-cluster/81911)

<div class="topic-metadata">

**Author:** [@jmair](https://discourse.julialang.org/u/jmair)\
**Replies:** 0\
**Last updated:** [May 30, 2022, 11:38am UTC](https://discourse.julialang.org/t/a-few-resources-to-help-enable-using-distributed-jl-on-a-slurm-cluster/81911 "2022-05-30T11:38:06Z")

</div>

I created some resources for a few colleagues new to Julia, to enable them to use our SLURM cluster effectively, using existing packages like Distributed.jl and ClusterManagers.jl. These scripts and resources do nothing…
