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

Split time-stepper-history cleaning from update #6019

Merged
merged 5 commits into from
May 29, 2024

Conversation

wthrowe
Copy link
Member

@wthrowe wthrowe commented May 22, 2024

Reduces the amount of data we need to store in checkpoints, mostly in LTS.

Proposed changes

Upgrade instructions

Evolution executables now need to include the Actions::CleanHistory action after each variable update. See the modifications to the executables in this PR for suggested exact changes.

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

Integrating at the wrong order should only happen during self-start,
and we don't do dense output during self-start.
Cleanup how happens at the end of the step, after the update and dense
output, in both LTS and GTS modes.  This allows the LTS time steppers
to keep less data between steps.
Copy link
Member

@nilsdeppe nilsdeppe left a comment

Choose a reason for hiding this comment

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

LGTM, one clarification question is all I have

/// - Modifies:
/// - Tags::HistoryEvolvedVariables<variables_tag>
template <typename System>
struct CleanHistory {
Copy link
Member

Choose a reason for hiding this comment

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

Just a note while I'm thinking about it: we should revisit all of our actions and see how much we can convert into Mutators, maybe even ones that can take a db::Access to move a lot of code into cpp files. This one looks like a possible candidate, which is what made me think of it. I don't think we should change anything in this PR, just noting it so I/we don't forget :)

Copy link
Member Author

Choose a reason for hiding this comment

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

We might need to template on dimension to get the mortar data tag (currently it searches DbTags), but otherwise I don't see any issues with making this a mutator.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good! A future problem, but just wanted to note it :)

@@ -68,6 +77,22 @@ struct CleanHistory {
},
make_not_null(&box));

// This action can't depend on Evolution, but most of the time
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, what below depends on evolution that the above doesn't?

Copy link
Member Author

Choose a reason for hiding this comment

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

For forward-declared stuff, there's imex::protocols::ImexSystem and imex::Tags::ImplicitHistory (from Imex, not directly Evolution, I guess), and evolution::dg::Tags::MortarDataHistory (actually in the helper above). For completely not-named stuff, const auto history on line 122 has a type including evolution::dg::MortarData.

(Really, a lot (all?) of the stuff in the Time directory should probably be merged into Evolution, but that sounds painful.)

Copy link
Member

Choose a reason for hiding this comment

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

Okay, thanks!

@nilsdeppe
Copy link
Member

Hmm, do you understand the clang-tidy error? Tthis looks like it's telling us to change the STL?

@wthrowe
Copy link
Member Author

wthrowe commented May 29, 2024

I think it's just complaining about charm stuff, but the charm class happens to be stored in a std::optional so the traces go through there.

I haven't examined the charm code in detail, but it looks like it's doing reference counting, which can cause false positives for this sort of automated analysis, so it's probably fine.

@nilsdeppe
Copy link
Member

Sounds good! Merging now :)

@nilsdeppe nilsdeppe merged commit c7346b4 into sxs-collaboration:develop May 29, 2024
20 of 22 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.

2 participants