Commit 408d86eb authored by Ondrej Vysocky's avatar Ondrej Vysocky
Browse files

FIX compilation error when msrsafe not available #59

parent 9f492060
...@@ -59,12 +59,12 @@ struct RegionParameters { ...@@ -59,12 +59,12 @@ struct RegionParameters {
struct systemLimits{ //Hz struct systemLimits{ //Hz
uint64_t maxCoreFreq; long maxCoreFreq;
uint64_t defaultCoreFreq; long defaultCoreFreq;
uint64_t minCoreFreq; long minCoreFreq;
uint64_t maxUncoreFreq; long maxUncoreFreq;
uint64_t defaultUncoreFreq; long defaultUncoreFreq;
uint64_t minUncoreFreq; long minUncoreFreq;
}; };
const int MSR_FREQ_MULT = 256; const int MSR_FREQ_MULT = 256;
......
...@@ -77,8 +77,6 @@ const uint64_t MSR_PKG_ENERGY_STATUS_mask = 0xFFFFFFFF; ...@@ -77,8 +77,6 @@ const uint64_t MSR_PKG_ENERGY_STATUS_mask = 0xFFFFFFFF;
#elif defined (HAVE_MSR_CORE_H) #elif defined (HAVE_MSR_CORE_H)
#include <msr_core.h> #include <msr_core.h>
#include <msr_rapl.h> #include <msr_rapl.h>
// #include <master.h>
// #include <libmsr_error.h>
using namespace MSR_RAPL_COUNTERS; using namespace MSR_RAPL_COUNTERS;
#else #else
using namespace X86ADAPT_RAPL_COUNTERS; using namespace X86ADAPT_RAPL_COUNTERS;
...@@ -87,15 +85,15 @@ const uint64_t MSR_PKG_ENERGY_STATUS_mask = 0xFFFFFFFF; ...@@ -87,15 +85,15 @@ const uint64_t MSR_PKG_ENERGY_STATUS_mask = 0xFFFFFFFF;
using namespace meric; using namespace meric;
std::string RAPL::suffix = "_"; std::string RAPL::suffix = "_";
int RAPL::NODE_SIZE_SOCKET = 1;
int RAPL::NODE_SIZE_CPU = 1;
int RAPL::SOCKET_SIZE_CPU = 1;
bool RAPL::detailedMode = false; bool RAPL::detailedMode = false;
unsigned long long int RAPL::COUNTERMAX = pow(2,32); unsigned long long int RAPL::COUNTERMAX = pow(2,32);
int RAPL::NODE_SIZE_SOCKET = 1;
#if defined (HAVE_X86_ADAPT_H) || defined (HAVE_MSR_CORE_H) #if defined (HAVE_X86_ADAPT_H) || defined (HAVE_MSR_CORE_H)
std::map<std::string, unsigned long long int> RAPL::counters; std::map<std::string, unsigned long long int> RAPL::counters;
std::map<std::string, double> RAPL::energyUnit; std::map<std::string, double> RAPL::energyUnit;
int RAPL::NODE_SIZE_CPU = 1;
int RAPL::SOCKET_SIZE_CPU = 1;
// solve counter overflow and add baseline energy consumption // solve counter overflow and add baseline energy consumption
unsigned long long RAPL::getResultValue(unsigned long long int startValue, unsigned long long int stopValue, double runtime, std::string counter) unsigned long long RAPL::getResultValue(unsigned long long int startValue, unsigned long long int stopValue, double runtime, std::string counter)
......
...@@ -33,7 +33,6 @@ private: ...@@ -33,7 +33,6 @@ private:
static std::map<std::string, unsigned long long int> counters; static std::map<std::string, unsigned long long int> counters;
static std::map<std::string, double> energyUnit; static std::map<std::string, double> energyUnit;
static std::string suffix; static std::string suffix;
static int NODE_SIZE_SOCKET;
static int NODE_SIZE_CPU; static int NODE_SIZE_CPU;
static int SOCKET_SIZE_CPU; static int SOCKET_SIZE_CPU;
static bool detailedMode; static bool detailedMode;
...@@ -59,6 +58,7 @@ private: ...@@ -59,6 +58,7 @@ private:
static bool detailedMode; static bool detailedMode;
static unsigned long long int COUNTERMAX; static unsigned long long int COUNTERMAX;
#endif #endif
static int NODE_SIZE_SOCKET;
}; };
} }
......
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