Skip to content

Commit

Permalink
do not pass pid 1 as first pid to check_same_host
Browse files Browse the repository at this point in the history
works around julialang issue JuliaLang/julia#26699
when running across multiple machines
  • Loading branch information
tanmaykm committed Apr 5, 2018
1 parent e7ca616 commit 867b543
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/array/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ end
const use_shared_array = Ref(true)
function _promote_array{T,S}(x::AbstractArray{T}, y::AbstractArray{S})
Q = promote_type(T,S)
samehost = Distributed.check_same_host(procs())
ok = (isa(x, Array) || isa(x, SharedArray)) && (isa(y, Array) || isa(y, SharedArray))
if use_shared_array[] && samehost && ok && isbits(Q)
if ok && isbits(Q) && use_shared_array[] && Distributed.check_same_host([workers()..., 1])
return SharedArray{Q}(length(x)+length(y), pids=procs())
else
return similar(x, Q, length(x)+length(y))
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ using Dagger

include("domain.jl")
include("array.jl")
println(STDERR, "tests done. cleaning up...")
Dagger.cleanup()
#include("cache.jl")
println(STDERR, "all done.")

0 comments on commit 867b543

Please sign in to comment.