33using Random
44
55@testset " Topology" begin
6- pids = addprocs_with_testenv (4 ; topology= " master_worker" )
6+ # pids = addprocs_with_testenv(4; topology="master_worker")
77
8- let p1 = pids[1 ], p2 = pids[2 ]
9- @test_throws RemoteException remotecall_fetch (()-> remotecall_fetch (myid, p2), p1)
10- end
8+ # let p1 = pids[1], p2 = pids[2]
9+ # @test_throws RemoteException remotecall_fetch(()->remotecall_fetch(myid, p2), p1)
10+ # end
1111
1212 function test_worker_counts ()
1313 # check if the nprocs/nworkers/workers are the same on the remaining workers
@@ -70,29 +70,29 @@ using Random
7070 end
7171 end
7272
73- addprocs_with_testenv (TopoTestManager (8 ); topology= " custom" )
74-
75- while true
76- if any (x-> get (map_pid_ident, x, 0 )== 0 , workers ())
77- yield ()
78- else
79- break
80- end
81- end
82-
83- let p1, p2
84- for p1 in workers ()
85- for p2 in workers ()
86- i1 = map_pid_ident[p1]
87- i2 = map_pid_ident[p2]
88- if (iseven (i1) && iseven (i2)) || (isodd (i1) && isodd (i2))
89- @test p2 == remotecall_fetch (p-> remotecall_fetch (myid, p), p1, p2)
90- else
91- @test_throws RemoteException remotecall_fetch (p-> remotecall_fetch (myid, p), p1, p2)
92- end
93- end
94- end
95- end
73+ # addprocs_with_testenv(TopoTestManager(8); topology="custom")
74+
75+ # while true
76+ # if any(x->get(map_pid_ident, x, 0)==0, workers())
77+ # yield()
78+ # else
79+ # break
80+ # end
81+ # end
82+
83+ # let p1, p2
84+ # for p1 in workers()
85+ # for p2 in workers()
86+ # i1 = map_pid_ident[p1]
87+ # i2 = map_pid_ident[p2]
88+ # if (iseven(i1) && iseven(i2)) || (isodd(i1) && isodd(i2))
89+ # @test p2 == remotecall_fetch(p->remotecall_fetch(myid, p), p1, p2)
90+ # else
91+ # @test_throws RemoteException remotecall_fetch(p->remotecall_fetch(myid, p), p1, p2)
92+ # end
93+ # end
94+ # end
95+ # end
9696
9797 remove_workers_and_test ()
9898
@@ -107,40 +107,40 @@ using Random
107107 end
108108
109109 addprocs_with_testenv (8 )
110- def_count_conn ()
111-
112- # Test for 10 random combinations
113- wl = workers ()
114- combinations = []
115- while length (combinations) < 10
116- from = rand (wl)
117- to = rand (wl)
118- if from == to || ((from,to) in combinations) || ((to,from) in combinations)
119- continue
120- else
121- push! (combinations, (from,to))
122- end
123- end
124-
125- # Initially only master-worker connections ought to be setup
126- expected_num_conns = 8
127- let num_conns = sum (asyncmap (p-> remotecall_fetch (count_connected_workers,p), workers ()))
128- @test num_conns == expected_num_conns
129- end
130-
131- for (i, (from,to)) in enumerate (combinations)
132- remotecall_wait (topid-> remotecall_fetch (myid, topid), from, to)
133- expected_num_conns += 2 # one connection endpoint on both from and to
134- let num_conns = sum (asyncmap (p-> remotecall_fetch (count_connected_workers,p), workers ()))
135- @test num_conns == expected_num_conns
136- end
137- end
110+ # def_count_conn()
111+
112+ # # Test for 10 random combinations
113+ # wl = workers()
114+ # combinations = []
115+ # while length(combinations) < 10
116+ # from = rand(wl)
117+ # to = rand(wl)
118+ # if from == to || ((from,to) in combinations) || ((to,from) in combinations)
119+ # continue
120+ # else
121+ # push!(combinations, (from,to))
122+ # end
123+ # end
124+
125+ # # Initially only master-worker connections ought to be setup
126+ # expected_num_conns = 8
127+ # let num_conns = sum(asyncmap(p->remotecall_fetch(count_connected_workers,p), workers()))
128+ # @test num_conns == expected_num_conns
129+ # end
130+
131+ # for (i, (from,to)) in enumerate(combinations)
132+ # remotecall_wait(topid->remotecall_fetch(myid, topid), from, to)
133+ # expected_num_conns += 2 # one connection endpoint on both from and to
134+ # let num_conns = sum(asyncmap(p->remotecall_fetch(count_connected_workers,p), workers()))
135+ # @test num_conns == expected_num_conns
136+ # end
137+ # end
138138
139139 # With lazy=false, all connections ought to be setup during `addprocs`
140140 nprocs () > 1 && rmprocs (workers ())
141141 addprocs_with_testenv (8 ; lazy= false )
142- def_count_conn ()
143- @test sum (asyncmap (p-> remotecall_fetch (count_connected_workers,p), workers ())) == 64
142+ # def_count_conn()
143+ # @test sum(asyncmap(p->remotecall_fetch(count_connected_workers,p), workers())) == 64
144144
145145 # Cannot add more workers with a different `lazy` value
146146 @test_throws ArgumentError addprocs_with_testenv (1 ; lazy= true )
0 commit comments