diff --git a/src/simple_stats.cc b/src/simple_stats.cc index d1ca1819..4c2c6f14 100644 --- a/src/simple_stats.cc +++ b/src/simple_stats.cc @@ -98,6 +98,12 @@ std::string SimpleStats::GetTextHeader(bool is_final) const { return header; } +double SimpleStats::RankBackgroundEnergy(const int rank) const{ + return vec_doubles_.at("act_stb_energy")[rank] + + vec_doubles_.at("pre_stb_energy")[rank] + + vec_doubles_.at("sref_energy")[rank]; +} + void SimpleStats::PrintEpochStats() { UpdateEpochStats(); if (config_.output_level >= 1) { diff --git a/src/simple_stats.h b/src/simple_stats.h index 8ed30971..2e03892c 100644 --- a/src/simple_stats.h +++ b/src/simple_stats.h @@ -30,6 +30,9 @@ class SimpleStats { // add historgram value void AddValue(const std::string name, const int value); + // return per rank background energy + double RankBackgroundEnergy(const int r) const; + // Epoch update void PrintEpochStats(); diff --git a/src/thermal_replay.cc b/src/thermal_replay.cc index de90017e..6832aedf 100644 --- a/src/thermal_replay.cc +++ b/src/thermal_replay.cc @@ -75,7 +75,8 @@ void ThermalReplay::Run() { } } for (int c = 0; c < config_.channels; c++) { - channel_stats_[c].PrintFinalStats(clk, std::cout, std::cout, std::cout); + //channel_stats_[c].PrintFinalStats(clk, std::cout, std::cout, std::cout); + channel_stats_[c].PrintFinalStats(); } thermal_calc_.PrintFinalPT(clk); } @@ -187,7 +188,7 @@ void ThermalReplay::ProcessCMD(Command &cmd, uint64_t clk) { for (int c = 0; c < config_.channels; c++) { // where to print isn't important here what we really need is the // updated stats - channel_stats_[c].PrintEpochStats(clk, std::cout); + channel_stats_[c].PrintEpochStats(); for (int r = 0; r < config_.ranks; r++) { double bg_energy = channel_stats_[c].RankBackgroundEnergy(r); thermal_calc_.UpdateBackgroundEnergy(c, r, bg_energy);