2828namespace shammodels {
2929
3030 inline std::string report_perf_timestep (
31- f64 rate, u64 nobj, f64 tcompute, f64 mpi_timer, f64 alloc_time, size_t max_mem) {
31+ f64 rate,
32+ u64 nobj,
33+ u64 npatch,
34+ f64 tcompute,
35+ f64 mpi_timer,
36+ f64 alloc_time,
37+ size_t max_mem) {
3238
3339 std::string log_rank_rate = shambase::format (
34- " \n | {:<4} | {:.4e} | {:11} | {:.3e} | {:3.0f} % | {:3.0f} % | {:>10s} |" ,
40+ " \n | {:<4} | {:.4e} | {:11} | {:6} | {:.3e} | {:3.0f} % | {:3.0f} % | "
41+ " {:>10s} |" ,
3542 shamcomm::world_rank (),
3643 rate,
3744 nobj,
45+ npatch,
3846 tcompute,
3947 100 * (mpi_timer / tcompute),
4048 100 * (alloc_time / tcompute),
@@ -44,16 +52,19 @@ namespace shammodels {
4452 shamcomm::gather_str (log_rank_rate, gathered);
4553
4654 u64 obj_total = shamalgs::collective::allreduce_sum (nobj);
55+ u64 npatch_total = shamalgs::collective::allreduce_sum (npatch);
4756 f64 max_t = shamalgs::collective::allreduce_max (tcompute);
4857 f64 sum_t = shamalgs::collective::allreduce_sum (tcompute);
4958 f64 sum_mpi = shamalgs::collective::allreduce_sum (mpi_timer);
5059 f64 sum_alloc = shamalgs::collective::allreduce_sum (alloc_time);
5160 size_t sum_mem_total = shamalgs::collective::allreduce_sum (max_mem);
5261
5362 std::string log_all_rate = shambase::format (
54- " \n | all | {:.4e} | {:11} | {:.3e} | {:3.0f} % | {:3.0f} % | {:>10s} |" ,
63+ " \n | all | {:.4e} | {:11} | {:6} | {:.3e} | {:3.0f} % | {:3.0f} % | "
64+ " {:>10s} |" ,
5565 f64 (obj_total) / max_t ,
5666 obj_total,
67+ npatch_total,
5768 max_t ,
5869 100 * (sum_mpi / sum_t ),
5970 100 * (sum_alloc / sum_t ),
@@ -64,19 +75,18 @@ namespace shammodels {
6475 // clang-format off
6576 if (shamcomm::world_rank () == 0 ) {
6677 print = " processing rate infos : \n " ;
67- print += (" ---------------------------------------------------------------------------------------\n " );
68- print += (" | rank | rate (N.s^-1) | Nobj | t compute (s) | MPI | alloc | mem (max) |\n " );
78+ print += (" ----------------------------------------------------------------------------------------------- \n " );
79+ print += (" | rank | rate (N.s^-1) | Nobj | Npatch | t compute (s) | MPI | alloc | mem (max) |\n " );
6980 if (shamcomm::world_size () > 1 ) {
70- print += (" ------------------------------------- Per ranks ---------------------------------------" );
81+ print += (" ----------------------------------------- Per ranks ----- ---------------------------------------" );
7182 print += (gathered) + " \n " ;
72- // print += ("| rank | rate (N.s^-1) | Nobj | t compute (s) | interf | alloc | mem (max) |\n");
73- print += (" ---------<sum N>/<max t> ----- <sum> ------- <max> ------ <avg> -- <avg> --- <sum> ----" );
83+ print += (" ---------<sum N>/<max t> ----- <sum> ------- <sum> -- <max> ------ <avg> -- <avg> --- <sum> ----" );
7484 print += (log_all_rate) + " \n " ;
7585 }else {
76- print += (" ---------------------------------------------------------------------------------------" );
86+ print += (" ------------------------------------------------------------------------------------------------ " );
7787 print += (gathered) + " \n " ;
7888 }
79- print += (" ---------------------------------------------------------------------------------------" );
89+ print += (" ------------------------------------------------------------------------------------------------ " );
8090 }
8191 // clang-format on
8292
0 commit comments