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 some restarts w/non-CC fields #1144

Merged
merged 2 commits into from
Aug 1, 2024
Merged

Conversation

bprather
Copy link
Collaborator

@bprather bprather commented Jul 30, 2024

When restarting, Parthenon reads fields into a temporary space allocated to be as large as the largest field. However, if the largest field was e.g. face-centered it would not be calculated correctly, resulting in overflowing the temporary.

Additionally, I think this would have made sparse non-CC fields read wrong.

I just simplify both with the new, better VarInfo utilities.

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

When restarting, Parthenon reads fields into a temporary space
allocated to be as large as the largest field.  However,
if the largest field was e.g. face-centered it would not be
calculated correctly, resulting in overflowing the temporary.

Additionally, I think this would have made sparse non-CC fields
read wrong.

I just simplify both with the new, better `VarInfo` utilities.
Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

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

good catch! I must have missed this when I was doing the non-CC I/O rewrite

Copy link
Collaborator

@pgrete pgrete left a comment

Choose a reason for hiding this comment

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

Nice! This also reads a lot better.

@bprather bprather enabled auto-merge July 31, 2024 22:23
@bprather bprather merged commit 1d483e9 into develop Aug 1, 2024
53 checks passed
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.

3 participants