diff --git a/src/darray.jl b/src/darray.jl index c4b12b1..f728d70 100644 --- a/src/darray.jl +++ b/src/darray.jl @@ -79,7 +79,14 @@ Base.hash(d::DArray, h::UInt) = Base.hash(d.id, h) function DArray(id, init, dims, pids, idxs, cuts) localtypes = Vector{DataType}(undef,length(pids)) - + + # fixes issue #206 + pids=copy(pids) + ind=findfirst(isequal(myid()),pids) + if ind != nothing + pids[end],pids[ind]=pids[ind],pids[end] + end + @sync begin for i = 1:length(pids) @async begin