@@ -156,6 +156,7 @@ init_time_stamps (const util::TimeStamp& run_t0, const util::TimeStamp& case_t0,
156
156
{
157
157
m_atm_logger->info (" [EAMxx] Run start time stamp: " + run_t0.to_string ());
158
158
m_atm_logger->info (" [EAMxx] Case start time stamp: " + case_t0.to_string ());
159
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
159
160
160
161
EKAT_REQUIRE_MSG (case_t0<=run_t0,
161
162
" Error! Case t0 time stamp must precede the run t0 time stamp.\n "
@@ -225,6 +226,7 @@ void AtmosphereDriver::create_atm_processes()
225
226
m_atm_logger->info (" [EAMxx] create_atm_processes ..." );
226
227
start_timer (" EAMxx::init" );
227
228
start_timer (" EAMxx::create_atm_processes" );
229
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
228
230
229
231
// At this point, must have comm and params set.
230
232
check_ad_status (s_comm_set | s_params_set);
@@ -241,13 +243,15 @@ void AtmosphereDriver::create_atm_processes()
241
243
stop_timer (" EAMxx::create_atm_processes" );
242
244
stop_timer (" EAMxx::init" );
243
245
m_atm_logger->info (" [EAMxx] create_atm_processes ... done!" );
246
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
244
247
}
245
248
246
249
void AtmosphereDriver::create_grids ()
247
250
{
248
251
m_atm_logger->info (" [EAMxx] create_grids ..." );
249
252
start_timer (" EAMxx::init" );
250
253
start_timer (" EAMxx::create_grids" );
254
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
251
255
252
256
// Must have procs created by now (and comm/params set)
253
257
check_ad_status (s_procs_created | s_comm_set | s_params_set | s_ts_inited);
@@ -314,6 +318,7 @@ void AtmosphereDriver::create_grids()
314
318
stop_timer (" EAMxx::create_grids" );
315
319
stop_timer (" EAMxx::init" );
316
320
m_atm_logger->info (" [EAMxx] create_grids ... done!" );
321
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
317
322
}
318
323
319
324
void AtmosphereDriver::setup_surface_coupling_data_manager (SurfaceCouplingTransferType transfer_type,
@@ -523,6 +528,7 @@ void AtmosphereDriver::add_additional_column_data_to_property_checks () {
523
528
void AtmosphereDriver::create_fields ()
524
529
{
525
530
m_atm_logger->info (" [EAMxx] create_fields ..." );
531
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
526
532
start_timer (" EAMxx::init" );
527
533
start_timer (" EAMxx::create_fields" );
528
534
@@ -679,12 +685,14 @@ void AtmosphereDriver::create_fields()
679
685
stop_timer (" EAMxx::create_fields" );
680
686
stop_timer (" EAMxx::init" );
681
687
m_atm_logger->info (" [EAMxx] create_fields ... done!" );
688
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
682
689
}
683
690
684
691
void AtmosphereDriver::create_output_managers () {
685
692
m_atm_logger->info (" [EAMxx] create_output_managers ..." );
686
693
start_timer (" EAMxx::init" );
687
694
start_timer (" EAMxx::create_output_managers" );
695
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
688
696
689
697
check_ad_status (s_comm_set | s_params_set | s_ts_inited);
690
698
@@ -748,10 +756,12 @@ void AtmosphereDriver::create_output_managers () {
748
756
stop_timer (" EAMxx::create_output_managers" );
749
757
stop_timer (" EAMxx::init" );
750
758
m_atm_logger->info (" [EAMxx] create_output_managers ... done!" );
759
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
751
760
}
752
761
753
762
void AtmosphereDriver::initialize_output_managers () {
754
763
m_atm_logger->info (" [EAMxx] initialize_output_managers ..." );
764
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
755
765
start_timer (" EAMxx::init" );
756
766
start_timer (" EAMxx::initialize_output_managers" );
757
767
@@ -788,6 +798,7 @@ void AtmosphereDriver::initialize_output_managers () {
788
798
stop_timer (" EAMxx::initialize_output_managers" );
789
799
stop_timer (" EAMxx::init" );
790
800
m_atm_logger->info (" [EAMxx] initialize_output_managers ... done!" );
801
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
791
802
}
792
803
793
804
void AtmosphereDriver::
@@ -1023,6 +1034,7 @@ void AtmosphereDriver::create_logger () {
1023
1034
void AtmosphereDriver::set_initial_conditions ()
1024
1035
{
1025
1036
m_atm_logger->info (" [EAMxx] set_initial_conditions ..." );
1037
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
1026
1038
1027
1039
auto & ic_pl = m_atm_params.sublist (" initial_conditions" );
1028
1040
@@ -1412,6 +1424,7 @@ void AtmosphereDriver::set_initial_conditions ()
1412
1424
}
1413
1425
1414
1426
m_atm_logger->info (" [EAMxx] set_initial_conditions ... done!" );
1427
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
1415
1428
}
1416
1429
1417
1430
void AtmosphereDriver::
@@ -1489,6 +1502,8 @@ initialize_constant_field(const FieldIdentifier& fid,
1489
1502
void AtmosphereDriver::initialize_atm_procs ()
1490
1503
{
1491
1504
m_atm_logger->info (" [EAMxx] initialize_atm_procs ..." );
1505
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
1506
+
1492
1507
start_timer (" EAMxx::init" );
1493
1508
start_timer (" EAMxx::initialize_atm_procs" );
1494
1509
@@ -1528,6 +1543,7 @@ void AtmosphereDriver::initialize_atm_procs ()
1528
1543
stop_timer (" EAMxx::initialize_atm_procs" );
1529
1544
stop_timer (" EAMxx::init" );
1530
1545
m_atm_logger->info (" [EAMxx] initialize_atm_procs ... done!" );
1546
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
1531
1547
1532
1548
report_res_dep_memory_footprint ();
1533
1549
0 commit comments