Skip to content

Fix bug: If the callee is never called. - #423

Merged
IrisvdWerf merged 3 commits into
multiscale:developfrom
IrisvdWerf:timeline-bug
Oct 14, 2026
Merged

IrisvdWerf merged 3 commits into
multiscale:developfrom
IrisvdWerf:timeline-bug

Conversation

@IrisvdWerf

@IrisvdWerf IrisvdWerf commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

When a caller never calls a component during a run, for example because the component is optional, that component used to crash. On its first run, reuse_instance() returned True even though its F_INIT ports had closed without a message. Now reuse_instance() only runs the first iteration without an F_INIT message if the component has no F_INIT ports at all. A component that has F_INIT ports but is never called shuts down cleanly.

@LourensVeen LourensVeen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've looked at it and I agree that this is the right solution. We do have a failing C++ test that needs to be fixed, and if the Python one could be improved a bit as indicated then this is good to go.

Comment thread integration_test/test_macro_micro.py Resolved

@LourensVeen LourensVeen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@IrisvdWerf
IrisvdWerf merged commit 8522cc3 into multiscale:develop Oct 14, 2026
13 checks passed
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.

2 participants