-
Notifications
You must be signed in to change notification settings - Fork 103
Add output:flush_frequency
for OptionsNetCDF
#2934
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
base: next
Are you sure you want to change the base?
Conversation
Appears on include guard instead of class
Avoids rewriting time-independent data, gives slight performance boost
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
* next: (563 commits) Bump DOI Add shim for ARKodeGetNumRhsEvals Suppress warning from `nodiscard` function Remove `boututils` from requirements; bump `boutdata` Fix deprecation warning Bump bundled fmt Fix some easy clang-tidy snes warnings Fix reorder warning from snes CI: Don't run clang-{tidy,format} on RC branches Update changelog Bump version to 5.2.0 Tweak version updater, mention in docs Add dependencies to changelog updater Add new authors Tweak citations updater, mention in docs Update translations Fix testCommandLineOptionsArePrinted Apply black changes Prevent SignalHandlerTestDeathTest when OS is FreeBSD Use the portable "/usr/bin/env bash" shebang instead of "/bin/bash" ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
}; | ||
|
||
/// Set timestep counter for flushing file | ||
void setFlushCounter(std::size_t iteration) { flush_counter = iteration; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::size_t" is directly included [misc-include-cleaner]
include/bout/physicsmodel.hxx:34:
- class PhysicsModel;
+ #include <cstddef>
+ class PhysicsModel;
Sort of fixes #2878
Two things:
output:flush_frequency
can be used to reduce how often netCDF data is flushed to disk (maybeflush_period
is a more accurate name?)Options
used to store data to be written to disk is now reset after writingThese two together can significantly cut the time spent in IO:
(absolute time from the
io
timer forconduction
example for 500 timesteps, rolling average over 100 steps)The red line is basically current
next
I'm a bit concerned that we still get an increase over time, but this seems to unavoidable.
This PR also includes some drive-by fixes for some minor
OptionsIO
issues.