summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--autoAdjustHwloc.hpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index accd20a..977e779 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ xXl2Nm/u3cPP/eQVrZz5H8eACwIv+LL1EV+9uLanWUa+IO5hHr3KElvKNKD6vN0=
### GNU Compiler
```
- sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential hwloc-dev
+ sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev
cmake .
make install
```
diff --git a/autoAdjustHwloc.hpp b/autoAdjustHwloc.hpp
index 4df476b..9022330 100644
--- a/autoAdjustHwloc.hpp
+++ b/autoAdjustHwloc.hpp
@@ -138,7 +138,7 @@ private:
if (obj->type == HWLOC_OBJ_CACHE)
{
size_t cacheSize = obj->attr->cache.size;
- size_t numHashL3 = cacheSize / m_scratchPadMemSize;
+ size_t numHashL3 = ( cacheSize + m_scratchPadMemSize/ 2llu ) / m_scratchPadMemSize;
/* check cache is exclusive or inclusive */
const char* value = hwloc_obj_get_info_by_name(obj, "Inclusive");
@@ -176,7 +176,7 @@ private:
numHashL3 = 0;
numHashes += extraHash;
//add L2 hashes
- numHashes += l2Cache / m_scratchPadMemSize;
+ numHashes += ( l2Cache + m_scratchPadMemSize / 2llu ) / m_scratchPadMemSize;
int numCachesLeft = numL2;
getConfig(topology, l3Cache, numHashes, numCachesLeft);
doL3 = false;
OpenPOWER on IntegriCloud