146
146
function check_worker_state (w:: Worker )
147
147
if w. state == W_CREATED
148
148
if ! isclusterlazy ()
149
- if PGRP. topology == :all_to_all
149
+ if PGRP. topology === :all_to_all
150
150
# Since higher pids connect with lower pids, the remote worker
151
151
# may not have connected to us yet. Wait for some time.
152
152
wait_for_conn (w)
@@ -448,7 +448,7 @@ function addprocs_locked(manager::ClusterManager; kwargs...)
448
448
params = merge (default_addprocs_params (), AnyDict (kwargs))
449
449
topology (Symbol (params[:topology ]))
450
450
451
- if PGRP. topology != :all_to_all
451
+ if PGRP. topology != = :all_to_all
452
452
params[:lazy ] = false
453
453
end
454
454
@@ -616,7 +616,7 @@ function create_worker(manager, wconfig)
616
616
# - On master, receiving a JoinCompleteMsg triggers rr_ntfy_join (signifies that worker setup is complete)
617
617
618
618
join_list = []
619
- if PGRP. topology == :all_to_all
619
+ if PGRP. topology === :all_to_all
620
620
# need to wait for lower worker pids to have completed connecting, since the numerical value
621
621
# of pids is relevant to the connection process, i.e., higher pids connect to lower pids and they
622
622
# require the value of config.connect_at which is set only upon connection completion
@@ -627,7 +627,7 @@ function create_worker(manager, wconfig)
627
627
end
628
628
end
629
629
630
- elseif PGRP. topology == :custom
630
+ elseif PGRP. topology === :custom
631
631
# wait for requested workers to be up before connecting to them.
632
632
filterfunc (x) = (x. id != 1 ) && isdefined (x, :config ) &&
633
633
(notnothing (x. config. ident) in something (wconfig. connect_idents, []))
@@ -832,7 +832,7 @@ julia> workers()
832
832
```
833
833
"""
834
834
function nprocs ()
835
- if myid () == 1 || (PGRP. topology == :all_to_all && ! isclusterlazy ())
835
+ if myid () == 1 || (PGRP. topology === :all_to_all && ! isclusterlazy ())
836
836
n = length (PGRP. workers)
837
837
# filter out workers in the process of being setup/shutdown.
838
838
for jw in PGRP. workers
@@ -885,7 +885,7 @@ julia> procs()
885
885
```
886
886
"""
887
887
function procs ()
888
- if myid () == 1 || (PGRP. topology == :all_to_all && ! isclusterlazy ())
888
+ if myid () == 1 || (PGRP. topology === :all_to_all && ! isclusterlazy ())
889
889
# filter out workers in the process of being setup/shutdown.
890
890
return Int[x. id for x in PGRP. workers if isa (x, LocalProcess) || (x. state == W_CONNECTED)]
891
891
else
@@ -894,7 +894,7 @@ function procs()
894
894
end
895
895
896
896
function id_in_procs (id) # faster version of `id in procs()`
897
- if myid () == 1 || (PGRP. topology == :all_to_all && ! isclusterlazy ())
897
+ if myid () == 1 || (PGRP. topology === :all_to_all && ! isclusterlazy ())
898
898
for x in PGRP. workers
899
899
if (x. id:: Int ) == id && (isa (x, LocalProcess) || (x:: Worker ). state == W_CONNECTED)
900
900
return true
@@ -1120,7 +1120,7 @@ function deregister_worker(pg, pid)
1120
1120
if myid () == 1 && (myrole () === :master ) && isdefined (w, :config )
1121
1121
# Notify the cluster manager of this workers death
1122
1122
manage (w. manager, w. id, w. config, :deregister )
1123
- if PGRP. topology != :all_to_all || isclusterlazy ()
1123
+ if PGRP. topology != = :all_to_all || isclusterlazy ()
1124
1124
for rpid in workers ()
1125
1125
try
1126
1126
remote_do (deregister_worker, rpid, pid)
0 commit comments