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

feat: Implement IterationEndedSyncEvent and TimestepEndedSyncEvent #3326

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

mkundu1
Copy link
Contributor

@mkundu1 mkundu1 commented Sep 27, 2024

Implemented sync events for IterationEnded and TimestepEnded to execute PyFluent-side callbacks synchronously. Fluent's solution monitoring mechanism has been used for the implementation. On every solution event, Fluent streams an auto-pause event and then goes to a paused state. Upon receiving the auto-pause event, the client executes the PyFluent-side callback and then remotely resumes Fluent.

Any exception thrown in the callback is converted to a logging error to ensure Fluent resumes at the end of callback execution. Those exceptions are raised in a secondary thread, the user's script cannot react in any way to those exceptions from the primary thread. There could still be some edge cases like calling solver.exit() within the callback which will indefinitely hang Fluent.

@mkundu1 mkundu1 linked an issue Sep 27, 2024 that may be closed by this pull request
2 tasks
@prmukherj
Copy link
Collaborator

Probably need to mark these tests to skip 22R2.

@mkundu1 mkundu1 merged commit b15c482 into main Oct 2, 2024
26 checks passed
@mkundu1 mkundu1 deleted the feat/sync-events branch October 2, 2024 12:05
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.

TimestepEndedEvent callback synchronous
4 participants