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

Fix ecl not able to parce errors from MPI runs #9248

Conversation

HakonSohoel
Copy link
Contributor

@HakonSohoel HakonSohoel commented Nov 18, 2024

Issue
Resolves #9237

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • 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

@HakonSohoel HakonSohoel marked this pull request as draft November 18, 2024 14:31
@HakonSohoel HakonSohoel changed the title Add test Fix ecl not able to parce errors from MPI runs Nov 19, 2024
@HakonSohoel HakonSohoel added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Nov 19, 2024
),
],
)
def test_can_parce_errors_when_eclipse_uses_multiple_cpus(
Copy link
Contributor

Choose a reason for hiding this comment

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

Small typo here, parse


run = ecl_run.EclRun("ECLCASE.DATA", "dummysimulatorobject")
error_list = run.parseErrors()
assert error_list == expected_error_list
Copy link
Contributor

Choose a reason for hiding this comment

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

Possible to simplify some, since the expected output is the list of the input?
You could probably test against [prt_error] and trim away a lot in the parameter section for the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, would have been possible with the simple tests where prt_error only contains one message. I've added a test with a prt_error log containing a mix of messages, where only some will be included in the error_list to verify that the parseErrors function correctly extracts only the parts we're interested in.

@andreas-el andreas-el marked this pull request as ready for review November 19, 2024 07:10
Copy link
Contributor

@andreas-el andreas-el left a comment

Choose a reason for hiding this comment

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

🏖️ Nicely done!

@HakonSohoel HakonSohoel merged commit a8f4d73 into equinor:main Nov 20, 2024
42 checks passed
@HakonSohoel HakonSohoel deleted the fix-ecl_run-not-able-to-parse-errors-from-MPI-runs branch November 20, 2024 13:40
berland pushed a commit to berland/ert that referenced this pull request Nov 22, 2024
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.

ecl_run not able to parse errors from MPI runs
2 participants