Commit ee27281e authored by Ondrej Vysocky's avatar Ondrej Vysocky
Browse files

FIX variable name same as define #59

parent 1273a9ac
......@@ -487,7 +487,7 @@ void Environment::init(int system, RegionParameters defaultParameter, int rank)
defSet.close();
MERIC_INFO << "Disable scaling frequency of Intel P-state driver and set maximum P-state to all cores and set energy performance bias to maximum performance\n";
read_msr_by_idx(0, IA32_ENERGY_PERF_BIAS, &defaultSettings[systemType].IA32_ENERGY_PERF_BIAS);
read_msr_by_idx(0, IA32_ENERGY_PERF_BIAS, &defaultSettings[systemType].IA32_ENERGY_PERF_BIAS_default);
uint64_t REG_MAX_PSTATE = (defaultSettings[systemType].maxCoreFreq/100000000) << 8;
for (int cpu=0; cpu<NODE_SIZE_CPU; cpu++)
{
......@@ -495,7 +495,7 @@ void Environment::init(int system, RegionParameters defaultParameter, int rank)
defSet << defaultSettings[systemType].minCoreFreq / 1000;
defSet.close();
write_msr_by_idx(cpu, defaultSettings[systemType].IA32_ENERGY_PERF_BIAS, 0);
write_msr_by_idx(cpu, defaultSettings[systemType].IA32_ENERGY_PERF_BIAS_default, 0);
write_msr_by_idx(cpu, IA32_PERF_CTL, REG_MAX_PSTATE);
}
}
......@@ -837,7 +837,7 @@ void Environment::restoreSystemSettings()
defSet.open ("/sys/devices/system/cpu/cpu"+std::to_string(cpu)+"/cpufreq/scaling_max_freq");
defSet << defaultSettings[systemType].maxCoreFreq / 1000;
defSet.close();
write_msr_by_idx(cpu, IA32_ENERGY_PERF_BIAS, defaultSettings[systemType].IA32_ENERGY_PERF_BIAS);
write_msr_by_idx(cpu, IA32_ENERGY_PERF_BIAS, defaultSettings[systemType].IA32_ENERGY_PERF_BIAS_default);
}
#endif
}
......
......@@ -119,7 +119,7 @@ struct systemLimits{
long maxPowerCapRAMtime; //us
uint64_t defaultPowerCapRAM; //raw register value
uint64_t IA32_ENERGY_PERF_BIAS; //raw register value
uint64_t IA32_ENERGY_PERF_BIAS_default; //raw register value
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment