-
-
Notifications
You must be signed in to change notification settings - Fork 239
Add reinitialization for AutoSwitch #1258
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
Conversation
ChrisRackauckas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work to get it out the door. Let's make sure the same is done to StochasticDiffEq while it's on our minds.
| @@ -1,4 +1,4 @@ | |||
| mutable struct AutoSwitch{nAlg,sAlg,tolType,T} | |||
| mutable struct AutoSwitchCache{nAlg,sAlg,tolType,T} | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in #325, it would make sense to make this immutable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind. I see that this became the cache and that the struct below is immutable. I'll grab some coffee.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to bring it to full immutability to guarantee safety, but this is the quickest way to working so it's worth it for now. The plan is to probably have a GSoC to follow up and do more stiffness estimates, in which case we'll pick this back up and probably make it immutable, but at least if it's fully thread-safe already that can wait.
|
It would be nice to have a test of thread-safety though... but that might be hard to cook up here. |
Fix https://discourse.julialang.org/t/ode-autotsit5-rodas5-switching-bug-depends-from-tolerance-history/45288