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

FIX handling several architectures frequencies scaling limits #38

parent 540a8b7b
......@@ -213,11 +213,11 @@ DistributedMeric::DistributedMeric()
Environment::init(SYS_JETSON, defaultParameter, _MPInodeRank);
else if (Meric::MODE == MODE_THUNDER)
Environment::init(SYS_THUNDER, defaultParameter, _MPInodeRank);
else if (Meric::MODE == MODE_DAVIDE)
Environment::init(SYS_DAVIDE, defaultParameter, _MPInodeRank);
// else if (Meric::MODE == MODE_DAVIDE)
// Environment::init(SYS_DAVIDE, defaultParameter, _MPInodeRank);
else
Environment::init(SYS_HASWELL, defaultParameter, _MPInodeRank);
//Environment::init(SYS_OTHER, defaultParameter, _MPInodeRank);
// Environment::init(SYS_HASWELL, defaultParameter, _MPInodeRank);
Environment::init(SYS_OTHER, defaultParameter, _MPInodeRank);
for (int socket=0; socket < Environment::NODE_SIZE_SOCKET; socket++)
currentState.socket[socket] = defaultParameter;
......
......@@ -70,11 +70,11 @@ SharedMeric::SharedMeric()
Environment::init(SYS_JETSON, defaultParameter, 0);
else if (Meric::MODE == MODE_THUNDER)
Environment::init(SYS_THUNDER, defaultParameter, 0);
else if (Meric::MODE == MODE_DAVIDE)
Environment::init(SYS_DAVIDE, defaultParameter, 0);
// else if (Meric::MODE == MODE_DAVIDE)
// Environment::init(SYS_DAVIDE, defaultParameter, 0);
else
//Environment::init(SYS_OTHER, defaultParameter, 0);
Environment::init(SYS_HASWELL, defaultParameter, 0); //this default settings must persist due to many nodes with min uncore frequency limit set to maximum - now it is fixed
Environment::init(SYS_OTHER, defaultParameter, 0);
// Environment::init(SYS_HASWELL, defaultParameter, 0); //this default settings must persist due to many nodes with min uncore frequency limit set to maximum - now it is fixed
for (int socket=0; socket < Environment::NODE_SIZE_SOCKET; socket++)
......
......@@ -5,18 +5,20 @@ using namespace meric;
// LIST OF POSSIBLE frequencies for JETSON CPUs (kHz)
// 102000 204000 307200 403200 518400 614400 710400 825600 921600 1036800 1132800 1224000 1326000 1428000 1555500 1632000 1734000
// LIST OF POSSIBLE frequnecies for JETSON memory (kHz)
// LIST OF POSSIBLE frequencies for JETSON memory (kHz)
// 40800 68000 102000 204000 408000 665600 800000 1065600 1331200 1600000
// LIST OF POSSIBLE frequencies for DAVIDE
// 4023000 3757000 3491000 3225000 2959000 2693000 2427000 2161000 2061000
systemLimits Environment::FreqLimits [4];
/* [] = {
//systemLimits Environment::FreqLimits [4];
systemLimits Environment::FreqLimits [] = {
[SYS_HASWELL] = { 33, 25, 12, 30, 30, 12 },
[SYS_JETSON] = { 1734000, 518400, 102000, 1600000, 408000, 40800},
[SYS_THUNDER] = { -1, -1, -1, -1, -1, -1}, //DVFS not supported
[SYS_OTHER] = { -1, -1, -1, -1, -1, -1}
[SYS_THUNDER] = { -1, -1, -1, -1, -1, -1 }, //DVFS+UFS not supported
[SYS_DAVIDE] = { 4023000, 4023000, 2061000, -1, -1, -1 }, //UFS not supported
[SYS_OTHER] = { -1, -1, -1, -1, -1, -1 }
};
*/
int Environment::NODE_SIZE_CPU = 0;
int Environment::NODE_SIZE_SOCKET = 0;
int Environment::SOCKET_SIZE_CPU = 0;
......@@ -162,7 +164,7 @@ void Environment::frequency(uint64_t freq, int socket)
if (freq == 0)
return;
if (systemType == SYS_THUNDER)
if (FreqLimits[SYS_OTHER].defaultCoreFreq == -1)
return; //DVFS not supported
if (freq < FreqLimits[systemType].minCoreFreq)
......@@ -262,7 +264,7 @@ void Environment::uncoreFrequency(uint64_t maxFreq, uint64_t minFreq, int socket
if (maxFreq == 0 || minFreq == 0)
return;
if (systemType == SYS_THUNDER || systemType == SYS_DAVIDE)
if (FreqLimits[SYS_OTHER].defaultUncoreFreq == -1)
return; //UFS not supported
if (maxFreq > FreqLimits[systemType].maxUncoreFreq || minFreq < FreqLimits[systemType].minUncoreFreq || maxFreq < minFreq)
......
......@@ -62,7 +62,7 @@ public:
static int NODE_SIZE_SOCKET;
static int SOCKET_SIZE_CPU;
static systemLimits FreqLimits [4];
static systemLimits FreqLimits [5];
static int systemType;
static void frequency(uint64_t freq, int socket = -1);
......
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