We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2e9e19 commit fc0c137Copy full SHA for fc0c137
src/core.jl
@@ -443,12 +443,14 @@ Convert a local array to distributed.
443
function distribute(A::AbstractArray;
444
procs = workers()[1:min(nworkers(), maximum(size(A)))],
445
dist = defaultdist(size(A), procs))
446
+ np = prod(dist)
447
+ procs_used = procs[1:np]
448
idxs, _ = chunk_idxs([size(A)...], dist)
449
- s = verified_destination_serializer(reshape(procs, size(idxs)), size(idxs)) do pididx
450
+ s = verified_destination_serializer(reshape(procs_used, size(idxs)), size(idxs)) do pididx
451
A[idxs[pididx]...]
452
end
- return DArray(I->localpart(s), size(A), procs, dist)
453
+ return DArray(I->localpart(s), size(A), procs_used, dist)
454
455
456
"""
0 commit comments