You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recommend making the interface for distribute more consistent with DArray by adding an optional procs argument. This will allow for an array distributed to a subset of the workers. A common use case is testing the performance of different numbers of workers on a task.
function distribute(a::AbstractArray, procs=workers()[1:min(nworkers(), maximum(size(a)))])
owner = myid()
rr = RemoteRef()
put!(rr, a)
d = DArray(size(a), procs) do I
remotecall_fetch(owner, ()->fetch(rr)[I...])
end
# Ensure that all workers have fetched their localparts.
# Else a gc in between can recover the RemoteRef rr
for chunk in d.chunks
wait(chunk)
end
d
end
The text was updated successfully, but these errors were encountered:
I recommend making the interface for distribute more consistent with DArray by adding an optional procs argument. This will allow for an array distributed to a subset of the workers. A common use case is testing the performance of different numbers of workers on a task.
The text was updated successfully, but these errors were encountered: