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

ERROR: "No matching function wrapper was found!" in some special case(s) #916

Closed
asprionj opened this issue Dec 3, 2022 · 0 comments · Fixed by SciML/DiffEqBase.jl#851
Closed

Comments

@asprionj
Copy link

asprionj commented Dec 3, 2022

Julia 1.8.2, DiffEq 7.6.0. The following fails:

using DifferentialEquations
prob = ODEProblem((dx,x,p,t)->(dx.=0), (p,t)->zeros(2), (0,10))
solve(prob, TRBDF2())

Interestingly, other cases do work; it seems to be the combination of an implicit solver, in-place function, more than one state variable (length(x) > 1), and providing the initial state via a function. Explicitly, all the following formulations work fine:

ODEProblem((dx,x,p,t)->(dx.=0), (p,t)->zeros(1), (0,10))
ODEProblem((dx,x,p,t)->(dx.=0), zeros(2), (0,10))
ODEProblem((x,p,t)->zeros(2), (p,t)->zeros(2), (0,10))

Also, the original, failing formulation does work when not specifying the solver, i.e. using the default one:

prob = ODEProblem((dx,x,p,t)->(dx.=0), (p,t)->zeros(2), (0,10))
solve(prob)

Edit: Also when explicitly setting the specialization to either NoSpecialize or FullSpecialize, there is no error, e.g.:

ODEProblem{true, SciMLBase.FullSpecialize}((dx,x,p,t)->(dx.=0), (p,t)->zeros(2), (0,10))

Which is obvious since then no wrapping occurs.

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

Successfully merging a pull request may close this issue.

1 participant