# Distributing a job across a cluster with SlurmClusterManager.jl

**URL:** <https://discourse.julialang.org/t/distributing-a-job-across-a-cluster-with-slurmclustermanager-jl/104735>\
**Category:** Julia at Scale\
**Tags:** question, package\
**Created:** [October 8, 2023, 7:56pm UTC](https://discourse.julialang.org/t/distributing-a-job-across-a-cluster-with-slurmclustermanager-jl/104735 "2023-10-08T19:56:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gideonsimpson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gideonsimpson/32/1928_2.png) [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Post date:** [October 8, 2023, 7:56pm UTC](https://discourse.julialang.org/t/distributing-a-job-across-a-cluster-with-slurmclustermanager-jl/104735/1 "2023-10-08T19:56:05Z")

</div>

I asked about this on the slack channel, but didn’t get a response.

I’ve been using `SlurmClusterManager` and been pretty satisfied with it, but there’s a job I want to accomplish with it that I’m not sure how to do.

The job I want to do has `m` cases. each of these cases can be done independently, and I would like to assign a whole node, with all its cores `n`, to work on each case. If each of the `m` cases only required 1 core, then, I would have run my `sbatch` command with `--ntasks=m` and `--cpus-per-task=1` ; the Julia code would then work fine with the naive `pmap` command.

Any suggestions would be appreciated. As indicated, my cluster uses Slurmn for scheduling.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [October 9, 2023, 6:22am UTC](https://discourse.julialang.org/t/distributing-a-job-across-a-cluster-with-slurmclustermanager-jl/104735/2 "2023-10-09T06:22:57Z")

</div>

If I am not wrong you want the --exclusive flag

---

<div class="post-metadata">

**Author:** ![gideonsimpson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gideonsimpson/32/1928_2.png) [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Post date:** [October 10, 2023, 7:41pm UTC](https://discourse.julialang.org/t/distributing-a-job-across-a-cluster-with-slurmclustermanager-jl/104735/3 "2023-10-10T19:41:22Z")

</div>

I think I know how to get the resources I want from the cluster manager, in terms of getting `m` nodes and all `n` cores on each of those nodes. What I’m more concerned with is how, presumably within Julia, I get it to assign one piece of the job to node 1, using all `n` cores on node 1, another piece of the job to node 2, using all `n` cores on node 2, etc.
