@@ -20,7 +20,13 @@ struct Node
20
20
pid:: Integer
21
21
function Node (cid, pid)
22
22
@assert haskey (cluster_table[], cid)
23
- @assert (@fetchfrom (cid, in (pid, workers (role= :master ))))
23
+ # @assert(@fetchfrom(cid, in(pid, workers(role=:master))))
24
+ try
25
+ b = remotecall_fetch (w -> in (w, Distributed. workers (role= :master )), cid, pid)
26
+ @assert b
27
+ catch e
28
+ @info e
29
+ end
24
30
new (cid, pid)
25
31
end
26
32
end
@@ -38,6 +44,7 @@ function addcluster(access_node, nw; kwargs...)
38
44
master_id = addprocs ([access_node]; access_node_args... )
39
45
40
46
@everywhere master_id @eval using MPIClusterManagers
47
+ @everywhere master_id @eval using Distributed
41
48
42
49
@info " master_id = $master_id "
43
50
@@ -46,15 +53,15 @@ function addcluster(access_node, nw; kwargs...)
46
53
@info " compute_node_args = $compute_node_args "
47
54
48
55
wpids = if MPI
49
- remotecall_fetch (addprocs, master_id[1 ], MPIWorkerManager (nw); compute_node_args... )
56
+ remotecall_fetch (Distributed . addprocs, master_id[1 ], MPIWorkerManager (nw); compute_node_args... )
50
57
else
51
58
# TODO
52
59
throw (" not implemented" )
53
60
end
54
61
55
- @info " pids = $wpids "
62
+ @info " pids ? $wpids "
56
63
57
- cluster_table[][master_id] = ClusterInfo (master_id[1 ], access_node, nw, access_node_args, compute_node_args, [ wpids] )
64
+ cluster_table[][master_id[ 1 ]] = ClusterInfo (master_id[1 ], access_node, nw, access_node_args, compute_node_args, wpids)
58
65
59
66
return Cluster (master_id[1 ])
60
67
end
0 commit comments