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 {
struct systemLimits{ //Hz
uint64_t maxCoreFreq;
uint64_t defaultCoreFreq;
uint64_t minCoreFreq;
uint64_t maxUncoreFreq;
uint64_t defaultUncoreFreq;
uint64_t minUncoreFreq;
long maxCoreFreq;
long defaultCoreFreq;
long minCoreFreq;
long maxUncoreFreq;
long defaultUncoreFreq;
long minUncoreFreq;
};
const int MSR_FREQ_MULT = 256;
......
......@@ -77,8 +77,6 @@ const uint64_t MSR_PKG_ENERGY_STATUS_mask = 0xFFFFFFFF;
#elif defined (HAVE_MSR_CORE_H)
#include <msr_core.h>
#include <msr_rapl.h>
// #include <master.h>
// #include <libmsr_error.h>
using namespace MSR_RAPL_COUNTERS;
#else
using namespace X86ADAPT_RAPL_COUNTERS;
......@@ -87,15 +85,15 @@ const uint64_t MSR_PKG_ENERGY_STATUS_mask = 0xFFFFFFFF;
using namespace meric;
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;
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)
std::map<std::string, unsigned long long int> RAPL::counters;
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
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:
static std::map<std::string, unsigned long long int> counters;
static std::map<std::string, double> energyUnit;
static std::string suffix;
static int NODE_SIZE_SOCKET;
static int NODE_SIZE_CPU;
static int SOCKET_SIZE_CPU;
static bool detailedMode;
......@@ -59,6 +58,7 @@ private:
static bool detailedMode;
static unsigned long long int COUNTERMAX;
#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