Skip to content

Commit

Permalink
Merge pull request #25155 from JuliaLang/vc/distributed_topo
Browse files Browse the repository at this point in the history
rename topology master_slave to master_worker
  • Loading branch information
vchuravy authored Dec 18, 2017
2 parents c4b3a38 + cb5172b commit 2f0b777
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,11 @@ end
const PGRP = ProcessGroup([])

function topology(t)
assert(t in [:all_to_all, :master_slave, :custom])
if t == :master_slave
Base.depwarn("The topology :master_slave is deprecated, use :master_worker instead.", :topology)
t = :master_worker
end
assert(t in [:all_to_all, :master_worker, :custom])
if (PGRP.topology==t) || ((myid()==1) && (nprocs()==1)) || (myid() > 1)
PGRP.topology = t
else
Expand Down
2 changes: 1 addition & 1 deletion src/managers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Keyword arguments:
+ `topology=:all_to_all`: All processes are connected to each other. The default.
+ `topology=:master_slave`: Only the driver process, i.e. `pid` 1 connects to the
+ `topology=:master_worker`: Only the driver process, i.e. `pid` 1 connects to the
workers. The workers do not connect to each other.
+ `topology=:custom`: The `launch` method of the cluster manager specifies the
Expand Down
4 changes: 2 additions & 2 deletions test/topology.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

pids = addprocs_with_testenv(4; topology="master_slave")
pids = addprocs_with_testenv(4; topology="master_worker")

let p1 = pids[1], p2 = pids[2]
@test_throws RemoteException remotecall_fetch(()->remotecall_fetch(myid, p2), p1)
Expand Down Expand Up @@ -117,7 +117,7 @@ while length(combinations) < 10
end
end

# Initially only master-slave connections ought to be setup
# Initially only master-worker connections ought to be setup
expected_num_conns = 8
let num_conns = sum(asyncmap(p->remotecall_fetch(count_connected_workers,p), workers()))
@test num_conns == expected_num_conns
Expand Down

0 comments on commit 2f0b777

Please sign in to comment.