Enzyme.jl Assertion Error in geom_generator Function

Hi everyone,

I’m encountering an issue with my implementation using Enzyme.jl in Julia. The error message I’m receiving is:
julia: /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:870: std::vector<int, std::allocator<int> > LateLowerGCFrame::NumberAllBase(State&, llvm::Value*): Assertion `Tracked.size() == BaseNumbers.size()' failed.
This error occurs when I call the geom_generator function. Here is the function definition:
``

function geom_generator(diff_args::Array{Float64}, const_eu_args::Array{Float64})

alpha = diff_args[1]
beta = diff_args[2]    
dim_val = const_eu_args[1]
step_conc_region = const_eu_args[2]
dang = 1.0 * (step_conc_region / (0.5 * dim_val))
ang = [i for i in 0:dang:(2*pi - dang)]
xi = alpha * cos.(ang)
eta = beta * sin.(ang)
x = xi .* ((xi.^2 + eta.^2).^(-1.0) .+ 1.0)
y = eta .* (((xi.^2 + eta.^2).^(-1.0)) * (-1.0) .+ 1.0)

return x, y
end

``

Questions:

  1. What does the assertion error Tracked.size() == BaseNumbers.size() mean in the context of Enzyme.jl?
  2. Is there something inherently wrong with my function that could be causing this error?
  3. How can I modify my function or setup to avoid this error?

Any insights or suggestions would be greatly appreciated.

Can you post the whole code you’re differentiating (eg with relevant autodiff call), as well as both Enzyme and Julia version.

That rrror comes from the Julia compiler itself and denotes an error in garbage collection

acm_solver.jl (27.6 KB)
main_solve.jl (4.3 KB)
support_funcs.jl (2.9 KB)
The user calls main_solve.jl There is also requirement of a .json file but that is only providing the relevant simulation parameters.

Sorry, to confirm what julia version are you using?

julia version 1.7.3

What happens if you use Julia 1.10. I’m fairly certain this bug was fixed in a later version of Julia

1 Like

Thanks updated to 1.10.3 the issue has resolved.