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

Vector history not being output if no scalar history present #1058

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

brryan
Copy link
Collaborator

@brryan brryan commented Apr 17, 2024

PR Summary

Running vector history downstream, I just ran into another bug: If a package only has vector history outputs enrolled, these will be ignored by an earlier continue statement in the loop over history variables triggered by a lack of scalar history outputs.

Trivial fix, works downstream for me.

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

@brryan brryan added the bug Something isn't working label Apr 17, 2024
labels[hist_var.hst_op].push_back(hist_var.label);
// Check if the package has enrolled scalar history functions which are stored in the
// Params under the `hist_param_key` name.
if (params.hasKey(hist_param_key)) {
Copy link
Collaborator Author

@brryan brryan Apr 17, 2024

Choose a reason for hiding this comment

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

Only potential change in behavior is that, even if no history vars are enrolled, we still update md_base if it was empty or if it had a different size than pm->block_list. I think this is fine because codes shouldn't be designed around not updating this variable during history output only if no history variables were requested.

I also now update md_base only once for all packages rather than inside the for (const auto &pkg : packages) loop.

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.

LGTM straightforward fix

@pgrete pgrete enabled auto-merge (squash) April 23, 2024 08:34
@pgrete pgrete merged commit a885e1d into develop Apr 23, 2024
49 checks passed
@Yurlungur Yurlungur deleted the brryan/fix_vec_hst branch April 23, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants