While looking for a way to flatten an DArray, I found mapchunks, which looks perfectly suited for this job. Unfortunately it is currently buggy. Probably because there is no test for it.
|
function mapchunks(f, d::DArray{T,N,F}) where {T,N,F} |
|
chunks = map(d.chunks) do chunk |
|
owner = get_parent(chunk.processor).pid |
|
remotecall_fetch(mapchunk, owner, f, chunk) |
|
end |
|
DArray{T,N,F}(d.domain, d.subdomains, chunks, d.concat) |
|
end |
The DArray constructor used here does not exist any longer. There is a new argument - the partitioning - which need to be added.
- DArray{T,N,F}(d.domain, d.subdomains, chunks, d.concat)
+ DArray{T,N}(d.domain, d.subdomains, chunks, d.partitioning, d.concat)
While looking for a way to flatten an DArray, I found
mapchunks, which looks perfectly suited for this job. Unfortunately it is currently buggy. Probably because there is no test for it.Dagger.jl/src/array/darray.jl
Lines 387 to 393 in cec17a1
The DArray constructor used here does not exist any longer. There is a new argument - the partitioning - which need to be added.