You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using DifferentialEquations
using ForwardDiff: gradient
functionode_f(du, u, p, t)
x = u[1]
v = u[2]
dx = v
dv =-x
du[1] = dx
du[2] = dv
endfunctionf(initial)
tspan = (0.0,1.0)
prob =ODEProblem(ode_f, initial, tspan)
sol =solve(prob)
sol[end][1]
endgradient(f, Float32[1.0, 1.0])
Gives a "No matching function wrapper was found!" error with a very long stacktrace.
Empirically, I have many workarounds:
Using finite differencing avoids the error.
Using Float64 inputs avoids the error
Using ODEProblem{true, DifferentialEquations.SciMLBase.FullSpecialize} avoids the error
Using ODEProblem{true, DifferentialEquations.SciMLBase.NoSpecialize} avoids the error
I suspect that there is an inconsistency between the code the decides which input types to precompute when using FunctionWrappersWrappers and the code that calls the doubly wrapped function.
This MWE
Gives a "No matching function wrapper was found!" error with a very long stacktrace.
Empirically, I have many workarounds:
ODEProblem{true, DifferentialEquations.SciMLBase.FullSpecialize}
avoids the errorODEProblem{true, DifferentialEquations.SciMLBase.NoSpecialize}
avoids the errorI suspect that there is an inconsistency between the code the decides which input types to precompute when using FunctionWrappersWrappers and the code that calls the doubly wrapped function.
This issue stems from an investigation into SciML/juliatorch#10. If this issue were fixed then I expect that SciML/juliatorch#10 would also be fixed
Maually truncated stacktrace
The text was updated successfully, but these errors were encountered: