Skip to content

Commit 0b7f344

Browse files
committed
Remove mtjulia script
1 parent 9cf039f commit 0b7f344

File tree

4 files changed

+2
-29
lines changed

4 files changed

+2
-29
lines changed

docs/src/index.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,6 @@ workers() == @onprocs workers() myid()
107107
Note: If the data can be expressed in terms of a `DistributedArrays.DArray`, it may be more appropriate and convenient to use the multiprocess execution tooling available in the package `DistributedArrays` (possibly combined with `ParallelProcessingTools.@onthreads`).
108108

109109

110-
## Creating multithreaded workers
111-
112-
Julia currently doesn't provide an easy way to start multithreaded remote worker instances. `ParallelProcessingTools` provides a script `mtjulia.sh` (currently Linux-only) that will start Julia with `$JULIA_NUM_THREADS` set to a suitable value for each worker host (currently the number of physical processes on one NUMA node). `mtjulia_exe()` will return the absolute path to `mtjulia.sh`. So multithreaded workers can be spawned (via SSH) like this:
113-
114-
```julia
115-
addprocs([hostname1, ...], exename = mtjulia_exe())
116-
```
117-
118-
119110
### Example use case:
120111

121112
As a simple real-world use case, let's histogram distributed data on multiple processes and threads:
@@ -124,7 +115,7 @@ Set up a cluster of multithreaded workers and load the required packages:
124115

125116
```julia
126117
using Distributed, ParallelProcessingTools
127-
addprocs(["hostname1", ...], exename = mtjulia_exe())
118+
addprocs(2)
128119
@everywhere using ParallelProcessingTools, Base.Threads,
129120
DistributedArrays, Statistics, StatsBase
130121
```

src/onprocs.jl

-12
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,3 @@ macro mp_async(expr)
5656
end
5757
end
5858
export @mp_async
59-
60-
61-
function mtjulia_exe()
62-
if Sys.islinux()
63-
joinpath(@__DIR__, "..", "bin", "mtjulia.sh")
64-
else
65-
# No equivalent for "mtjulia.sh" implemented for non-Linux systems yet,
66-
# return default exename:
67-
joinpath(Sys.BINDIR, Base.julia_exename())
68-
end
69-
end
70-
export mtjulia_exe

test/test_onprocs.jl

-6
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ using Distributed
4444
end
4545
end
4646

47-
@testset "mtjulia_exe" begin
48-
if Sys.islinux()
49-
@test fetch(@spawnat first(workers()) nthreads()) > 1
50-
end
51-
end
52-
5347
@testset "Examples" begin
5448
@test begin
5549
workers() == (@onprocs workers() myid())

test/test_readme_examples.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212
@testset "workpartition" begin
1313
@testset "parallel histogramming" begin
1414
using Distributed, ParallelProcessingTools
15-
addprocs(2, exename = mtjulia_exe())
15+
addprocs(2)
1616
@everywhere using ParallelProcessingTools, Base.Threads,
1717
DistributedArrays, Statistics, StatsBase
1818

0 commit comments

Comments
 (0)