# A few resources to help enable using Distributed.jl on a SLURM cluster

**URL:** <https://discourse.julialang.org/t/a-few-resources-to-help-enable-using-distributed-jl-on-a-slurm-cluster/81911>\
**Category:** Specific Domains\
**Tags:** cluster, distributed, slurm, tip\
**Created:** [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")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [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/1 "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 novel or imaginative, and are more of an example of how one can use the existing packages, only abstracting away some details. The aim of the script is so that one can write code in a file using _Distributed.jl_ (`pmap`, `workers` `@distrbitued` etc) in a way that will work locally on one’s own machine, and then one can use these resources to easily put one’s code onto a cluster, without changing the source code.

Additionally, it has some examples of how to allocate a GPU to each process, so each worker can run code using CUDA.jl.

All of the file are in a gist here:  
[https://gist.github.com/JamieMair/0b1ffbd4ee424c173e6b42fe756e877a](https://gist.github.com/JamieMair/0b1ffbd4ee424c173e6b42fe756e877a)
