-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Call to solve
fails with `LoadError: "No matching function wrapper was found"
#893
Comments
MWE as promised: using DifferentialEquations
using Plots
f(u, p, t) = 1.01 * u
u0 = 1 / 2
tspan = (0.0, 1.0)
# This works without issue
prob = ODEProblem(f, u0, tspan)
# This also works
prob = ODEProblem{false,true}(f, u0, tspan)
# These error with "No matching function wrapper was found"
# prob = ODEProblem{true,false}(f, u0, tspan) # this one is not relevant to the example, but was how things were for our ODE
# prob = ODEProblem{false,false}(f, u0, tspan)
solver::RK4 = RK4()
sol = solve(prob, solver, reltol = 1e-8, abstol = 1e-9)
plot(sol, linewidth = 5, title = "Solution to the linear ODE with a thick line",
xaxis = "Time (t)", yaxis = "u(t) (in μm)", label = "My Thick Line!") # legend=false
plot!(sol.t, t -> 0.5 * exp(1.01t), lw = 3, ls = :dash, label = "True Solution!") Can't remember what the second boolean in |
It was never documented. Using undocumented features should be done with some caution 😅. The behavior changed and was allowed to change because it was unreleased not public API. What exactly it does will be explained in more detail when it's released. What you really want here is |
So okay, this looks fine since it matches the expected behavior of the specializations. |
Just to clarify, I only included it in the MWE to indicate that it does not work for the ODE function we're using, whereas previously it did.
Oh really? I don't know how I came across it then because I've never dug too deeply into the package codebase. |
If you find it somewhere in the docs, let me know 😅
Yes, because previously |
Sorry to open this up again. We just ran into the same problem. We used to construct the So if I have to set this parameter to make it work for my way of formulating the model function, it has to be documented. What's the basic idea behind it? When (and why) does the "automatic specialization" not work (such as in our case)? |
It is documented in detail in the docstrings. https://docs.sciml.ai/DiffEqDocs/stable/types/ode_types/#SciMLBase.ODEProblem
It should work now? If it doesn't, that's worth an issue. The case of this issue, at least the MWE that I've seen, is fine in the latest versions. |
Thanks for the links to the docs, it's clear now what it's all about. Our use-case at hand involves generating We're not on DiffEq 7.6.0, and we do have the issue of the "No matching function wrapper was found" Error. I'd have to extract some MWE reproducing our situation, but am currently vey short on time. I'll see if I can manage to still do it. |
Since the system is relatively new, v7.4, 7.5, and 7.6 all had some stuff that was ironing out bugs. I wouldn't even try to look for an MWE before updating as it may already be fixed.
Possibly. Though the late specialization form in one of the later DiffEq versions fixed a lot of issues here. |
Haha, nasty typo. I did mean "We're now on DiffEq 7.6.0...". |
Okay, well then an MWE would be helpful to figure out what's going on here. But |
Could not fully pinpoint the issue. But it seems to be caused by specifying the initial state as a function. In the original formulation, I use |
oh interesting. Yeah that case may need a few more tests. Would be good to get an issue and an MWE. |
Done: #916 |
This is with DifferentialEquations v7.2, Julia v1.8 and v1.7.3 on Windows 11.
Trying to replicate with a simpler example, will update once I do.
Output from
status -m
attachedDiffEq_7.2_JLv1.8_W11.txt
The text was updated successfully, but these errors were encountered: