Commit 7cbe0aca authored by Ondrej Vysocky's avatar Ondrej Vysocky
Browse files

FIX DVFS with intel Pstate - system files uses kHz #59

parent c643d6eb
......@@ -411,7 +411,7 @@ void Environment::init(int system, RegionParameters defaultParameter, int rank)
for (int cpu=0; cpu<NODE_SIZE_CPU; cpu++)
{
defSet.open ("/sys/devices/system/cpu/cpu"+std::to_string(cpu)+"/cpufreq/scaling_max_freq");
defSet << defaultSettings[systemType].minCoreFreq;
defSet << defaultSettings[systemType].minCoreFreq / 1000;
defSet.close();
write_msr_by_idx(cpu, IA32_ENERGY_PERF_BIAS, 0);
......@@ -801,7 +801,7 @@ void Environment::restoreSystemSettings()
for (int cpu=0; cpu<NODE_SIZE_CPU; cpu++)
{
defSet.open ("/sys/devices/system/cpu/cpu"+std::to_string(cpu)+"/cpufreq/scaling_max_freq");
defSet << defaultSettings[systemType].maxCoreFreq;
defSet << defaultSettings[systemType].maxCoreFreq / 1000;
defSet.close();
write_msr_by_idx(cpu, IA32_ENERGY_PERF_BIAS, IA32_ENERGY_PERF_BIAS_default);
}
......
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