Skip to content

Commit 9dad53c

Browse files
authored
README: Move LocalAffinityManager docs from README into separate Markdown file (#259)
1 parent 6cd57d1 commit 9dad53c

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,7 @@ For Slurm, please see the [SlurmClusterManager.jl](https://github.com/JuliaParal
5757

5858
### Using `LocalAffinityManager` (for pinning local workers to specific cores)
5959

60-
- Linux only feature.
61-
- Requires the Linux `taskset` command to be installed.
62-
- Usage : `addprocs(LocalAffinityManager(;np=CPU_CORES, mode::AffinityMode=BALANCED, affinities=[]); kwargs...)`.
63-
64-
where
65-
66-
- `np` is the number of workers to be started.
67-
- `affinities`, if specified, is a list of CPU IDs. As many workers as entries in `affinities` are launched. Each worker is pinned
68-
to the specified CPU ID.
69-
- `mode` (used only when `affinities` is not specified, can be either `COMPACT` or `BALANCED`) - `COMPACT` results in the requested number
70-
of workers pinned to cores in increasing order, For example, worker1 => CPU0, worker2 => CPU1 and so on. `BALANCED` tries to spread
71-
the workers. Useful when we have multiple CPU sockets, with each socket having multiple cores. A `BALANCED` mode results in workers
72-
spread across CPU sockets. Default is `BALANCED`.
60+
See [`docs/local_affinity.md`](docs/local_affinity.md)
7361

7462
### Using `ElasticManager` (dynamically adding workers to a cluster)
7563

docs/local_affinity.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Using `LocalAffinityManager` (for pinning local workers to specific cores)
2+
3+
- Linux only feature.
4+
- Requires the Linux `taskset` command to be installed.
5+
- Usage : `addprocs(LocalAffinityManager(;np=CPU_CORES, mode::AffinityMode=BALANCED, affinities=[]); kwargs...)`.
6+
7+
where
8+
9+
- `np` is the number of workers to be started.
10+
- `affinities`, if specified, is a list of CPU IDs. As many workers as entries in `affinities` are launched. Each worker is pinned
11+
to the specified CPU ID.
12+
- `mode` (used only when `affinities` is not specified, can be either `COMPACT` or `BALANCED`) - `COMPACT` results in the requested number
13+
of workers pinned to cores in increasing order, For example, worker1 => CPU0, worker2 => CPU1 and so on. `BALANCED` tries to spread
14+
the workers. Useful when we have multiple CPU sockets, with each socket having multiple cores. A `BALANCED` mode results in workers
15+
spread across CPU sockets. Default is `BALANCED`.

0 commit comments

Comments
 (0)