Skip to content

Commit 2981759

Browse files
author
Luyi Kang
committed
fix DTHERMAL compile error
1 parent 47dad81 commit 2981759

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/simple_stats.cc

+6
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ std::string SimpleStats::GetTextHeader(bool is_final) const {
9898
return header;
9999
}
100100

101+
double SimpleStats::RankBackgroundEnergy(const int rank) const{
102+
return vec_doubles_.at("act_stb_energy")[rank] +
103+
vec_doubles_.at("pre_stb_energy")[rank] +
104+
vec_doubles_.at("sref_energy")[rank];
105+
}
106+
101107
void SimpleStats::PrintEpochStats() {
102108
UpdateEpochStats();
103109
if (config_.output_level >= 1) {

src/simple_stats.h

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class SimpleStats {
3030
// add historgram value
3131
void AddValue(const std::string name, const int value);
3232

33+
// return per rank background energy
34+
double RankBackgroundEnergy(const int r) const;
35+
3336
// Epoch update
3437
void PrintEpochStats();
3538

src/thermal_replay.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ void ThermalReplay::Run() {
7575
}
7676
}
7777
for (int c = 0; c < config_.channels; c++) {
78-
channel_stats_[c].PrintFinalStats(clk, std::cout, std::cout, std::cout);
78+
//channel_stats_[c].PrintFinalStats(clk, std::cout, std::cout, std::cout);
79+
channel_stats_[c].PrintFinalStats();
7980
}
8081
thermal_calc_.PrintFinalPT(clk);
8182
}
@@ -187,7 +188,7 @@ void ThermalReplay::ProcessCMD(Command &cmd, uint64_t clk) {
187188
for (int c = 0; c < config_.channels; c++) {
188189
// where to print isn't important here what we really need is the
189190
// updated stats
190-
channel_stats_[c].PrintEpochStats(clk, std::cout);
191+
channel_stats_[c].PrintEpochStats();
191192
for (int r = 0; r < config_.ranks; r++) {
192193
double bg_energy = channel_stats_[c].RankBackgroundEnergy(r);
193194
thermal_calc_.UpdateBackgroundEnergy(c, r, bg_energy);

0 commit comments

Comments
 (0)