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

Scheduler now allows other code to run when starting realizations #9133

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

JHolba
Copy link
Contributor

@JHolba JHolba commented Nov 1, 2024

Make scheduler execute yield during spawning of realizations
This was blocking all other async tasks from running. Nothing could connect to ensemble evaluator during this.

Issue
May fix #8787

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@JHolba JHolba self-assigned this Nov 1, 2024
Copy link
Contributor

@xjules xjules left a comment

Choose a reason for hiding this comment

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

Nice @JHolba ! Could you make more descriptive commit why this works? Like that yielding before each realization helps, etc.

Starting the realizations in scheduler was blocking all other async tasks
from running. Nothing could connect to ensemble evaluator during this.
Under heavy load this could cause Monitor to time out and fail. Now we will
sleep(0) between each time we create a new subprocess. This will allow
other asyncio tasks to run.
@JHolba JHolba force-pushed the yield-when-spawning-reals branch 2 times, most recently from 428b9ae to b0f098c Compare November 1, 2024 13:52
@JHolba JHolba changed the title Make scheduler execute yield during spawning of realizations Scheduler now allows other code to run when starting realizations Nov 1, 2024
@JHolba JHolba added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Nov 1, 2024
@JHolba
Copy link
Contributor Author

JHolba commented Nov 1, 2024

Nice @JHolba ! Could you make more descriptive commit why this works? Like that yielding before each realization helps, etc.

Updated the commit message

@sondreso sondreso merged commit 90d11ec into equinor:main Nov 1, 2024
101 of 112 checks passed
@JHolba JHolba deleted the yield-when-spawning-reals branch November 1, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:bug-fix Automatically categorise as bug fix in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple failing cli tests on macos
3 participants