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

EAMxx: Set the defaults for flushing output files #7009

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/eamxx/src/share/io/scream_output_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ setup (const std::map<std::string,std::shared_ptr<fm_type>>& field_mgrs,
// Check if the prev run wrote any output file (it may have not, if the restart was written
// before the 1st output step). If there is a file, check if there's still room in it.
const auto& last_output_filename = get_attribute<std::string>(rhist_file,"GLOBAL","last_output_filename");
m_resume_output_file = last_output_filename!="" and not restart_pl.get("force_new_file",false);
m_resume_output_file = last_output_filename!="" and not restart_pl.get("force_new_file",true);
if (m_resume_output_file) {
m_output_file_specs.storage.num_snapshots_in_file = scorpio::get_attribute<int>(rhist_file,"GLOBAL","last_output_file_num_snaps");

Expand Down Expand Up @@ -705,7 +705,7 @@ setup_internals (const std::map<std::string,std::shared_ptr<fm_type>>& field_mgr
EKAT_ERROR_MSG ("Error! Unrecognized/unsupported file storage type.\n");
}
m_filename_prefix = m_params.get<std::string>("filename_prefix");
m_output_file_specs.flush_frequency = m_params.get("flush_frequency",large_int);
m_output_file_specs.flush_frequency = m_params.get("flush_frequency",1);

// Allow user to ask for higher precision for normal model output,
// but default to single to save on storage
Expand Down
1 change: 1 addition & 0 deletions components/eamxx/src/share/io/tests/output_restart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ TEST_CASE("output_restart","io")
output_params.set<std::vector<std::string>>("Field Names",{"field_1", "field_2", "field_3", "field_4","field_5"});
output_params.set<double>("fill_value",FillValue);
output_params.set<int>("flush_frequency",1);
output_params.sublist("Restart").set<bool>("force_new_file",false);
output_params.sublist("output_control").set<std::string>("frequency_units","nsteps");
output_params.sublist("output_control").set<int>("Frequency",10);
output_params.sublist("Checkpoint Control").set<int>("Frequency",5);
Expand Down
Loading