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

ENH system for uncore frequency restore to default ranges #38

parent afcf4204
......@@ -104,12 +104,33 @@ void Environment::getFrequenciesLimits()
x86_adapt_get_setting(fd, adaptHandlerUncore, &setting);
FreqLimits[SYS_OTHER].minUncoreFreq = (int)setting;
if (FreqLimits[SYS_OTHER].maxUncoreFreq == FreqLimits[SYS_OTHER].minUncoreFreq && FreqLimits[SYS_OTHER].maxUncoreFreq != -1)
struct stat info;
std::string uncoreFrequencyDefaultFile = std::string(MERIC_PATH)+"/build/ucfRestore.csv";
if(stat(uncoreFrequencyDefaultFile.c_str(), &info ) != 0)
{
std::cerr << "MERIC warning: system does not have correctly set uncore frequencies\n\tMERIC set them to 1.2-3.0GHz. FIX them if you are not runnig HSW-EP system.\n"; //BDW ranges are 1.2-2.7 GHz
FreqLimits[SYS_OTHER].maxUncoreFreq = FreqLimits[SYS_HASWELL].maxUncoreFreq;
FreqLimits[SYS_OTHER].minUncoreFreq = FreqLimits[SYS_HASWELL].minUncoreFreq;
FreqLimits[SYS_OTHER].defaultUncoreFreq = FreqLimits[SYS_HASWELL].defaultUncoreFreq;
if (FreqLimits[SYS_OTHER].minUncoreFreq != FreqLimits[SYS_OTHER].maxUncoreFreq)
{
std::ofstream ucfRestoreFile;
ucfRestoreFile.open (uncoreFrequencyDefaultFile);
ucfRestoreFile << FreqLimits[SYS_OTHER].minUncoreFreq << " " << FreqLimits[SYS_OTHER].maxUncoreFreq << std::endl;
ucfRestoreFile.close();
}
else
{
std::cerr << "MERIC error: system does not have correctly set uncore frequency range\n";
}
}
else if (FreqLimits[SYS_OTHER].minUncoreFreq == FreqLimits[SYS_OTHER].maxUncoreFreq)
{
std::string ucfString;
std::ifstream ucfRestoreFile;
ucfRestoreFile.open (uncoreFrequencyDefaultFile);
ucfRestoreFile >> ucfString;
FreqLimits[SYS_OTHER].minUncoreFreq = std::stoi(ucfString);
ucfRestoreFile >> ucfString;
FreqLimits[SYS_OTHER].maxUncoreFreq = std::stoi(ucfString);
ucfRestoreFile.close();
FreqLimits[SYS_OTHER].defaultUncoreFreq = FreqLimits[SYS_OTHER].maxUncoreFreq;
}
#endif
MERIC_INFO << "CORE FREQ limits: " << FreqLimits[SYS_OTHER].maxCoreFreq << '\t' << FreqLimits[SYS_OTHER].minCoreFreq<< std::endl;
......
......@@ -14,12 +14,12 @@ int JETSON::FREQUENCY = 10;
void JETSON::init() //int rank = 0)
{
//start energy measurement
system((std::string(ARMMEASUREMENTPATH)+"/getJTX1measurements.py "+ARM_INFO+" &").c_str());
system((std::string(MERIC_PATH)+"/tools/getJTX1measurements.py "+ARM_INFO+" &").c_str());
//get name of the file with measurements
char hostname[50];
gethostname(hostname, 50);
filename = std::string(ARMMEASUREMENTPATH)+"/jetsonMeasurement/"+std::string(hostname)+".csv";
filename = std::string(MERIC_PATH)+"/tools/jetsonMeasurement/"+std::string(hostname)+".csv";
}
......
......@@ -14,8 +14,8 @@ int THUNDER::FREQUENCY = 1;
void THUNDER::init() //int rank = 0)
{
//start energy measurement
system(("ssh -f hca \""+std::string(ARMMEASUREMENTPATH)+"/getYokogawaMeasurements.py "+ARM_INFO+"\"").c_str());
filename = std::string(ARMMEASUREMENTPATH)+"/yokogawaMeasurement/hca-server.csv"; //one file for all nodes
system(("ssh -f hca \""+std::string(MERIC_PATH)+"/tools/getYokogawaMeasurements.py "+ARM_INFO+"\"").c_str());
filename = std::string(MERIC_PATH)+"/tools/yokogawaMeasurement/hca-server.csv"; //one file for all nodes
}
......
......@@ -15,7 +15,7 @@ def configure(ctx):
ctx.env.append_unique("CXXFLAGS", [ "-qopenmp" ]) #Intel
ctx.env.append_unique("DEFINES", [ "HAVE_OMP_H" ]) #with openMP
ctx.env.append_unique("DEFINES", [ "ARMMEASUREMENTPATH=\""+ctx.path.abspath()+"/tools\""])
ctx.env.append_unique("DEFINES", [ "MERIC_PATH=\""+ctx.path.abspath()+"\""])
if ctx.options.debug:
ctx.env.append_unique("DEFINES", [ "__MERIC_DEBUG__" ])
......
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