Skip to content

Add output:flush_frequency for OptionsNetCDF#2934

Merged
bendudson merged 10 commits into
nextfrom
flush-frequency-netcdf
Mar 11, 2026
Merged

Add output:flush_frequency for OptionsNetCDF#2934
bendudson merged 10 commits into
nextfrom
flush-frequency-netcdf

Conversation

@ZedThree
Copy link
Copy Markdown
Member

@ZedThree ZedThree commented Jul 3, 2024

Sort of fixes #2878

Two things:

  • output:flush_frequency can be used to reduce how often netCDF data is flushed to disk (maybe flush_period is a more accurate name?)
  • the Options used to store data to be written to disk is now reset after writing

These two together can significantly cut the time spent in IO:

Figure_1

(absolute time from the io timer for conduction 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.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a 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

Comment thread src/physics/physicsmodel.cxx Outdated
Comment thread src/sys/options/options_netcdf.hxx Outdated
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a 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

Comment thread include/bout/physicsmodel.hxx
@ZedThree ZedThree force-pushed the flush-frequency-netcdf branch 2 times, most recently from eb3c63d to dee8b9c Compare January 7, 2026 09:07
@ZedThree ZedThree force-pushed the flush-frequency-netcdf branch from dee8b9c to c9e2e27 Compare March 11, 2026 11:22
Copy link
Copy Markdown
Contributor

@bendudson bendudson left a comment

Choose a reason for hiding this comment

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

Thanks @ZedThree !

@bendudson bendudson merged commit 12c5e2d into next Mar 11, 2026
1 check passed
@bendudson bendudson deleted the flush-frequency-netcdf branch March 11, 2026 15:56
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.

I/O Increases drastically in long simulations

2 participants