Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update distributed.md #29

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/src/distributed.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ using Distributed
using ClusterManagers
num_tasks = parse(Int, ENV["SLURM_NTASKS"]) # One process per task
cpus_per_task = parse(Int, ENV["SLURM_CPUS_PER_TASK"]) # Assign threads per process
addprocs(SlurmManager(num_tasks,
exe_flags=[
"--project",
"--threads=$cpus_per_task"]
)
addprocs(SlurmManager(num_tasks),
exe_flags=[
"--project",
"--threads=$cpus_per_task"]
)

```
You can check out [`ClusterManagers.jl`](https://github.com/JuliaParallel/ClusterManagers.jl) for your own cluster software if you are not using SLURM, but the process will be similar to this.

Expand All @@ -45,4 +45,4 @@ module load julia/1.8.2

julia --project run_script.jl
```
which can be saved to `launch_experiment.sh` and run with `sbatch launch_experiment.sh`. Note that you may need to include addition SBATCH directives like `--account` on your cluster. Check your cluster's documentation for more information.
which can be saved to `launch_experiment.sh` and run with `sbatch launch_experiment.sh`. Note that you may need to include addition SBATCH directives like `--account` on your cluster. Check your cluster's documentation for more information.
Loading