-
-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Description
My MWE:
using Distributed
addprocs(8)
@everywhere using Dagger
using FFTW
N = 64
A = rand(ComplexF64,N,N,N);
DA = DArray(A);
fft(DA)It throws error:
ERROR: DivideError: integer division error
Stacktrace:
[1] div
@ .\int.jl:295 [inlined]
[2] _cumlength(len::Int64, step::Int64)
@ Dagger E:\.julia\packages\Dagger\Jl5aj\src\array\alloc.jl:62
[3] map
@ .\tuple.jl:383 [inlined]
[4] map
@ .\tuple.jl:386 [inlined]
[5] partition
@ E:\.julia\packages\Dagger\Jl5aj\src\array\alloc.jl:69 [inlined]
[6] zeros(p::Blocks{3}, eltype::Type, dims::Tuple{Int64, Int64, Int64}; assignment::Symbol)
@ Dagger E:\.julia\packages\Dagger\Jl5aj\src\array\alloc.jl:153
[7] zeros
@ E:\.julia\packages\Dagger\Jl5aj\src\array\alloc.jl:151 [inlined]
[8] _fft!(output::DArray{…}, input::DArray{…}, dims::Tuple{…}; decomp::AbstractFFTsExt.Pencil)
@ AbstractFFTsExt E:\.julia\packages\Dagger\Jl5aj\ext\AbstractFFTsExt.jl:124
[9] fft(DA::DArray{ComplexF64, 3, Blocks{3}, typeof(cat)}, dims::Tuple{Int64, Int64, Int64}; decomp::AbstractFFTsExt.Pencil)
@ AbstractFFTsExt E:\.julia\packages\Dagger\Jl5aj\ext\AbstractFFTsExt.jl:62
[10] fft
@ E:\.julia\packages\Dagger\Jl5aj\ext\AbstractFFTsExt.jl:59 [inlined]
[11] fft(DA::DArray{ComplexF64, 3, Blocks{3}, typeof(cat)})
@ AbstractFFTsExt E:\.julia\packages\Dagger\Jl5aj\ext\AbstractFFTsExt.jl:59
[12] top-level scope
@ REPL[30]:1I also tried to manually control the partitions, whereas the DivideError cannot be solved:
DA = DArray(A, Blocks(N,N,div(N,8)));
DA = DArray(A, Blocks(N,N,2));
DA = DArray(A, Blocks(N,N,1));
DA = DArray(A, Blocks(8,8,8));
# Or change N and rerun
N = 20Couldn't figure out how does the error arise from:
Lines 68 to 71 in 13ac291
| function partition(p::AbstractBlocks, dom::ArrayDomain) | |
| DomainBlocks(map(first, indexes(dom)), | |
| map(_cumlength, map(length, indexes(dom)), p.blocksize)) | |
| end |
Lines 151 to 155 in 13ac291
| function Base.zeros(p::Blocks, eltype::Type, dims::Dims; assignment::AssignmentType = :arbitrary) | |
| d = ArrayDomain(map(x->1:x, dims)) | |
| a = AllocateArray(eltype, zeros, false, d, partition(p, d), p, assignment) | |
| return _to_darray(a) | |
| end |
Metadata
Metadata
Assignees
Labels
No labels