Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f8b84f2

Browse files
vtjnashandreasnoack
authored andcommittedJul 17, 2017
only broadcast using/import to nodes which need it
fix #12381 fix #13999
1 parent b8eb96a commit f8b84f2

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed
 

‎base/loading.jl

+7-2
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,16 @@ Windows.
316316
"""
317317
function require(mod::Symbol)
318318
_require(mod)
319-
# After successfully loading notify downstream consumers
319+
# After successfully loading, notify downstream consumers
320320
if toplevel_load[] && myid() == 1 && nprocs() > 1
321321
# broadcast top-level import/using from node 1 (only)
322322
@sync for p in procs()
323-
p == 1 || @async remotecall_fetch(_require, p, mod)
323+
p == 1 && continue
324+
@async remotecall_wait(p) do
325+
if !isbindingresolved(Main, mod) || !isdefined(Main, mod)
326+
_require(mod)
327+
end
328+
end
324329
end
325330
end
326331
for callback in package_callbacks

‎test/distributed_exec.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1750,9 +1750,6 @@ rmprocs(npids)
17501750
Base.cluster_cookie("foobar") # custom cookie
17511751
npids = addprocs_with_testenv(WorkerArgTester(`--worker=foobar`, false))
17521752
@test remotecall_fetch(myid, npids[1]) == npids[1]
1753-
=======
1754-
end
1755-
>>>>>>> include: assume that shared file systems exist for clusters
17561753

17571754
# Run topology tests last after removing all workers, since a given
17581755
# cluster at any time only supports a single topology.

0 commit comments

Comments
 (0)
Please sign in to comment.