Enzyme.jl icon indicating copy to clipboard operation
Enzyme.jl copied to clipboard

Issue with Enzymanigans fill_halo_event!

Open jlk9 opened this issue 1 year ago • 0 comments

@wsmoses

ERROR: LoadError: Enzyme execution failed.
Enzyme: Not yet implemented, mixed activity for jl_new_struct constants=Bool[1, 0]   %91 = call noalias nonnull {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* noundef nonnull @jl_f_tuple, {} addrspace(10)* noundef null, {} addrspace(10)* nonnull %82, {} addrspace(10)* nonnull %90) #53, !dbg !222 Tuple{Bool, Nothing}[(0, nothing), (0, nothing)] LLVM.CallInst[LLVM.CallInst(%82 = call nonnull {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* noundef nonnull @jl_f__apply_iterate, {} addrspace(10)* noundef null, {} addrspace(10)* addrspacecast ({}* inttoptr (i64 4718055888 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspacecast ({}* inttoptr (i64 4778552496 to {}*) to {} addrspace(10)*), {} addrspace(10)* nonnull %47) #57, !dbg !189), LLVM.CallInst(%90 = call nonnull {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* noundef nonnull @ijl_apply_generic, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4721100288 to {}*) to {} addrspace(10)*), {} addrspace(10)* nonnull %box, {} addrspace(10)* nonnull %87) #58, !dbg !219)]
Stacktrace:
 [1] permute_boundary_conditions
   @ ~/.julia/dev/Oceananigans/src/BoundaryConditions/fill_halo_regions.jl:124

Stacktrace:
  [1] throwerr(cstr::Cstring)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DE2Sn/src/compiler.jl:1283
  [2] permute_boundary_conditions
    @ ~/.julia/dev/Oceananigans/src/BoundaryConditions/fill_halo_regions.jl:124
  [3] #fill_halo_regions!#21
    @ ~/.julia/dev/Oceananigans/src/BoundaryConditions/fill_halo_regions.jl:53 [inlined]
  [4] augmented_julia__fill_halo_regions__21_13488_inner_1wrap
    @ ~/.julia/dev/Oceananigans/src/BoundaryConditions/fill_halo_regions.jl:0
  [5] macro expansion
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DE2Sn/src/compiler.jl:5371 [inlined]
  [6] enzyme_call(::Val{false}, ::Ptr{Nothing}, ::Type{Enzyme.Compiler.AugmentedForwardThunk}, ::Type{Val{1}}, ::Val{true}, ::Type{Tuple{Const{@Kwargs{async::Bool}}, Const{typeof(fill_halo_regions!)}, Duplicated{Tuple{OffsetArrays.OffsetArray{Float64, 3, Array{Float64, 3}}}}, Duplicated{Tuple{FieldBoundaryConditions{BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}, BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}, BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}, BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}, BoundaryCondition{Oceananigans.BoundaryConditions.Flux, Nothing}, BoundaryCondition{Oceananigans.BoundaryConditions.Flux, Oceananigans.BoundaryConditions.ContinuousBoundaryFunction{Center, Center, Nothing, Oceananigans.BoundaryConditions.RightBoundary, typeof(tracer_flux), @NamedTuple{surface_tracer_concentration::Int64, piston_velocity::Float64}, Tuple{Symbol}, Tuple{Int64}, Tuple{typeof(Oceananigans.Operators.identity4)}}}, BoundaryCondition{Oceananigans.BoundaryConditions.Flux, Nothing}}}}, Const{Tuple{Colon, Colon, Colon}}, Const{Tuple{Tuple{Center, Center, Center}}}, Const{RectilinearGrid{Float64, Periodic, Periodic, Bounded, Float64, Float64, Float64, OffsetArrays.OffsetVector{Float64, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}, OffsetArrays.OffsetVector{Float64, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}, OffsetArrays.OffsetVector{Float64, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}, CPU}}, Const{Clock{Float64}}, Duplicated{@NamedTuple{u::Field{Face, Center, Center, Nothing, RectilinearGrid{Float64, Periodic, Periodic, Bounded, Float64, Float64, Float64, OffsetArrays.OffsetVector{Float64, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}, OffsetArrays.OffsetVector{Float64, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}, OffsetArrays.OffsetVector{Float64, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}, CPU}, Tuple{Colon, Colon, Colon}, OffsetArrays.OffsetArray{Float64, 3, Array{Float64, 3}}, Float64, FieldBoundaryConditions{BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}, BoundaryCondition{Oceananigans.BoundaryConditions.Periodic, Nothing}, BoundaryCondition{O

jlk9 avatar Feb 12 '24 22:02 jlk9