Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded backend does not support "shrinking" domains #18

Open
tehrengruber opened this issue Jul 16, 2024 · 0 comments
Open

Embedded backend does not support "shrinking" domains #18

tehrengruber opened this issue Jul 16, 2024 · 0 comments

Comments

@tehrengruber
Copy link
Collaborator

Example:

@field_operator function lap(in_field::Field{Tuple{IDim_, JDim_}, Float64})
    return in_field +
           in_field(Ioff[1]) +
           in_field(Ioff[-1]) +
           in_field(Joff[1]) +
           in_field(Joff[-1])
end

Error:

ERROR: LoadError: DimensionMismatch: dimensions must match: a has dims (1:4, 1:4), b has dims (2:5, 1:4), mismatch at 1
Stacktrace:
 [1] promote_shape
   @ ./indices.jl:178 [inlined]
 [2] promote_shape(a::Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}}, b::Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}})
   @ Base ./indices.jl:169
 [3] +(A::Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}}, B::Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}})
   @ Base ./arraymath.jl:7
 [4] +
   @ ./operators.jl:587 [inlined]
 [5] lapᐞ0(in_field::Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}})
   @ Main ~/CSCS/GridTools.jl/test/laplacian_test.jl:22
 [6] backend_execution(backend::Val{:embedded}, fo::GridTools.FieldOp, args::Tuple{Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}}}, kwargs::@Kwargs{}, out::Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}}, is_outermost_fo::Bool)
   @ GridTools ~/CSCS/GridTools.jl/src/GridTools.jl:0
 [7] (::GridTools.FieldOp)(args::Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}}; offset_provider::Dict{String, Dimension}, backend::String, out::Field{Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Float64, 2, Tuple{Dimension{:IDim_, HORIZONTAL}, Dimension{:JDim_, HORIZONTAL}}, Matrix{Float64}}, kwargs::@Kwargs{})
   @ GridTools ~/CSCS/GridTools.jl/src/GridTools.jl:524
 [8] top-level scope
   @ ~/CSCS/GridTools.jl/test/laplacian_test.jl:33
in expression starting at /Users/lorenzovarese/CSCS/GridTools.jl/test/laplacian_test.jl:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant