22f64 shammodels::sph::SolverLog::get_last_rate() {
24 if (step_logs.size() == 0) {
28 u64 last_id = step_logs.size() - 1;
30 u64 obj_loc = step_logs[last_id].rank_count;
31 f64 time_loc = step_logs[last_id].elasped_sec;
33 u64 obj_total = shamalgs::collective::allreduce_sum(obj_loc);
34 f64 max_t = shamalgs::collective::allreduce_max(time_loc);
36 return f64(obj_total) / max_t;
39u64 shammodels::sph::SolverLog::get_last_obj_count() {
41 if (step_logs.size() == 0) {
45 u64 last_id = step_logs.size() - 1;
47 u64 cnt_loc = step_logs[last_id].rank_count;
49 u64 cnt_tot = shamalgs::collective::allreduce_sum(cnt_loc);
56 if (step_logs.size() == 0) {
60 auto &last_log = step_logs.back();
62 auto rank_metrics = shamsys::gather_rank_metrics(last_log.system_metrics);
63 return shamsys::aggregate_rank_metrics(rank_metrics);
double f64
Alias for double.
std::uint64_t u64
64 bit unsigned integer
This header file contains utility functions related to exception handling in the code.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.