mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 18:11:05 +00:00
Fixed support for systems where total count of NUMA nodes not equal usable count.
This commit is contained in:
parent
da39ed2ce0
commit
3badeb56a0
2 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@ xmrig::HwlocCpuInfo::HwlocCpuInfo() : BasicCpuInfo(),
|
||||||
|
|
||||||
m_threads = countByType(m_topology, HWLOC_OBJ_PU);
|
m_threads = countByType(m_topology, HWLOC_OBJ_PU);
|
||||||
m_cores = countByType(m_topology, HWLOC_OBJ_CORE);
|
m_cores = countByType(m_topology, HWLOC_OBJ_CORE);
|
||||||
m_nodes = std::max<size_t>(countByType(m_topology, HWLOC_OBJ_NUMANODE), 1);
|
m_nodes = std::max(hwloc_bitmap_weight(hwloc_topology_get_complete_nodeset(m_topology)), 1);
|
||||||
m_packages = countByType(m_topology, HWLOC_OBJ_PACKAGE);
|
m_packages = countByType(m_topology, HWLOC_OBJ_PACKAGE);
|
||||||
|
|
||||||
if (m_nodes > 1) {
|
if (m_nodes > 1) {
|
||||||
|
|
|
@ -246,7 +246,7 @@ xmrig::RxDataset *xmrig::Rx::dataset(const Job &job, uint32_t nodeId)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return d_ptr->datasets.at(d_ptr->isNUMA() ? nodeId : 0);
|
return d_ptr->datasets.at(d_ptr->isNUMA() ? (d_ptr->datasets.count(nodeId) ? nodeId : HwlocCpuInfo::nodeIndexes().front()) : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue