30 class Logger final :
public dealii::ParameterAcceptor,
38 const std::string &subsection =
"/Logger");
79 Number terminal_update_interval_;
80 bool terminal_correct_for_hyperthreading_;
82 std::string debug_command_;
83 std::string debug_filename_;
94 dealii::types::global_dof_index n_global_dofs_;
95 unsigned int n_devices_;
97 std::ofstream logfile_;
99 Number last_terminal_output_;
101 struct ThroughputData {
102 unsigned int cycle = 0;
104 double cpu_time_sum = 0.;
105 double cpu_time_avg = 0.;
106 double cpu_time_min = 0.;
107 double cpu_time_max = 0.;
108 double wall_time = 0.;
109 double device_time_sum = 0.;
110 } previous_, current_;
112 double time_per_second_exp_;
120 void print_debug_output();
122 void print_parameters(
const std::string &base_name, std::ostream &stream);
124 void print_mpi_partition(std::ostream &stream);
126 void print_device_information();
128 void print_head(
const std::string &header,
129 const std::string &secondary,
130 std::ostream &stream);
133 std::ostream &stream);
135 void print_memory_statistics(std::ostream &stream);
137 void print_timers(std::ostream &stream);
140 std::ostream &stream,
141 bool final_time =
false);
144 bool write_to_logfile =
false,
145 bool final_time =
false);