-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Failed ODE does not return the expected retcode #283
Comments
I'm not quite sure what you mean here. Could you share a bit more? |
I'll try to explain. Even though we have a failed EDO, the algorithm access this if block Sundials.jl/src/common_interface/solve.jl Lines 1477 to 1485 in 3fa20aa
Moreover, if you opt for a dense save, the evaluation of line 1482 That's why I opened this issue, we shouldn't evaluate |
Ahh, indeed that's odd and should get fixed. |
I added |
Although my ODE is failing by "Error test failures occurred too many times during one internal time step", the
integrator.retcode
still returned "Success".After some debugging I found that in if block (line 1477) the
integrator.flag
is changing from-3
to0
after evaluating lineSundials.jl/src/common_interface/solve.jl
Line 1482 in 3fa20aa
In my local code, I performed this change in order to get the correct
retcode
from my failed ODE:if integrator.opts.save_end && (isempty(integrator.sol.t) || integrator.sol.t[end] != integrator.t) && integrator.flag == 0
I hope that helps returning a more accurate error.
The text was updated successfully, but these errors were encountered: