JuliaParallel / JuliaParallel/DistributedArrays.jl
Add gather(d::DArray{T,N,Array{T,N}}) where {T, N}
- Dominant language
- Julia
- Stars
- 205
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
I am wondering why it is not possible to gather a DArray{T,N,Array{T,N}}?
I wrote this method to the gather function, it works for my purpose. Maybe it is possible to add it? (or maybe I did a mistake and it should be changed somehow?)
```
function gather(d::DArray{T,N,Array{T,N}}) where {T, N}
a=Array{T}(undef, size(d))
indices = collect.(d.indices)
@sync for (i,p) in enumerate(procs(d))
@async a[indices[i]...] = remotecall_fetch(localpart, p, d)
end
a
end
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the existing gather function and the DArray definition in DistributedArrays.jl, then compare current gather methods with the proposed DArray{T,N,Array{T,N}} signature. Verify the behavior with a distributed array whose local parts use Array storage; done means gather returns the expected Array with all distributed indices populated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100