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

Export model.tallies to XML in CoupledOperator #2840

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

gridley
Copy link
Contributor

@gridley gridley commented Jan 14, 2024

Description

The cause of the related issue was that the relatively new Model object's tallies variable was not being exported to XML. The older CoupledOperator code anticipated that users would have run tallies.export_to_xml(), but that's not how we do stuff with the Model class. Since the depletion interface now uses Model, that's a confusing expectation! It's by far best to have the CoupledOperator also export the tallies and plots file if they're present on Model.

Fixes #2839

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@gridley gridley requested a review from drewejohnson as a code owner January 14, 2024 05:20
@gridley
Copy link
Contributor Author

gridley commented Jan 14, 2024

Since this is such a critical functionality, I've added a test to ensure we don't lose this again.

@gridley
Copy link
Contributor Author

gridley commented Jan 14, 2024

Not my fault on the CI failure. Any suggestions on what to do about this?

Lines executed:42.62% of 61
Submitting coverage to coveralls.io...
Could not submit coverage: 504 Server Error: Gateway Time-out for url: https://coveralls.io/api/v1/jobs
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/coveralls/api.py", line 290, in submit_report
    response.raise_for_status()
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: https://coveralls.io/api/v1/jobs

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/coveralls/cli.py", line 95, in main
    result = coverallz.wear()
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/coveralls/api.py", line 257, in wear
    return self.submit_report(json_string)
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/coveralls/api.py", line 293, in submit_report
    raise CoverallsException(
coveralls.exception.CoverallsException: Could not submit coverage: 504 Server Error: Gateway Time-out for url: https://coveralls.io/api/v1/jobs
Error: Process completed with exit code 1.

@shimwell
Copy link
Member

Slightly related but do we have plans to move away from separate tallies.xml materials.xml etc and go for the model.xml for the CoupledOperator

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Thanks @gridley!

@paulromano paulromano merged commit fca4da4 into openmc-dev:develop Jan 23, 2024
17 checks passed
church89 pushed a commit to openmsr/openmc that referenced this pull request Jul 18, 2024
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.

Tallies ignored or not output in depletion calculations
3 participants