Skip to content
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

Simulator end of sim actions and exception handling #558

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

mkorbel1
Copy link
Contributor

Description & Motivation

This PR addresses a couple problems:

  • Fixes a bug (End of simulation actions are not reset by Simulator.reset #556) where end of simulation actions were not cleared at Simulator.reset, causing them to get executed on the next simulation run
  • Fixes a problem where the "end of simulation actions" were not executed if there was a simulator exception during the simulation. Since there sometimes "cleanup" types of activities registered at the end, it's important not to lose those.
    • Note: if a end of sim action throws an exception, other end of sim actions after it might not execute, nor the original simulator exception be thrown. This seems reasonable.

Related Issue(s)

Fix #556

Testing

Added new tests

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

Behavior will change, but this falls under "bug fix"

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No

@mkorbel1 mkorbel1 merged commit 79c0783 into intel:main Jan 27, 2025
3 checks passed
@mkorbel1 mkorbel1 deleted the sim_end_after_except branch January 27, 2025 19:50
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.

End of simulation actions are not reset by Simulator.reset
1 participant