Skip to content

Fix type instability #989

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

Closed
wants to merge 3 commits into from
Closed

Fix type instability #989

wants to merge 3 commits into from

Conversation

hersle
Copy link

@hersle hersle commented Apr 13, 2025

@hersle
Copy link
Author

hersle commented Apr 13, 2025

It seems #985 is also fixed after this.

@@ -229,7 +229,7 @@ function remake(prob::ODEProblem; f = missing,

iip = isinplace(prob)

if build_initializeprob == Val{true} || build_initializeprob == true
if build_initializeprob isa Val{true} || build_initializeprob == true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build_initializeprob defaults to Val{true} and Val{true} isa Val{true} == false so this won't run?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right ... 🤦

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other way to do it is build_initializeprob === Val{true}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't help. Looks like the problem is inside the if, within remake_initialization_data::Any. I effectively just made it if false so it never ran.

@hersle
Copy link
Author

hersle commented Apr 13, 2025

I think SciML/ModelingToolkit.jl#3560 is really just a rediscovery of #985.

Sorry for wasting your time, I thought I had narrowed this down to something simple ...

@hersle hersle closed this Apr 13, 2025
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 this pull request may close these issues.

3 participants