@@ -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::
@@ -1027,6 +1038,7 @@ void AtmosphereDriver::create_logger () {
1027
1038
void AtmosphereDriver::set_initial_conditions ()
1028
1039
{
1029
1040
m_atm_logger->info (" [EAMxx] set_initial_conditions ..." );
1041
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
1030
1042
1031
1043
auto & ic_pl = m_atm_params.sublist (" initial_conditions" );
1032
1044
@@ -1416,6 +1428,7 @@ void AtmosphereDriver::set_initial_conditions ()
1416
1428
}
1417
1429
1418
1430
m_atm_logger->info (" [EAMxx] set_initial_conditions ... done!" );
1431
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
1419
1432
}
1420
1433
1421
1434
void AtmosphereDriver::
@@ -1493,6 +1506,8 @@ initialize_constant_field(const FieldIdentifier& fid,
1493
1506
void AtmosphereDriver::initialize_atm_procs ()
1494
1507
{
1495
1508
m_atm_logger->info (" [EAMxx] initialize_atm_procs ..." );
1509
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
1510
+
1496
1511
start_timer (" EAMxx::init" );
1497
1512
start_timer (" EAMxx::initialize_atm_procs" );
1498
1513
@@ -1532,6 +1547,7 @@ void AtmosphereDriver::initialize_atm_procs ()
1532
1547
stop_timer (" EAMxx::initialize_atm_procs" );
1533
1548
stop_timer (" EAMxx::init" );
1534
1549
m_atm_logger->info (" [EAMxx] initialize_atm_procs ... done!" );
1550
+ m_atm_logger->flush (); // During init, flush often (to help debug crashes)
1535
1551
1536
1552
report_res_dep_memory_footprint ();
1537
1553
0 commit comments