Added fallback to basic auto configuration.

This commit is contained in:
XMRig 2019-07-30 09:17:54 +07:00
parent bd739d217b
commit aabf183462

View file

@ -33,6 +33,7 @@
#include "backend/cpu/platform/HwlocCpuInfo.h"
#include "base/io/log/Log.h"
namespace xmrig {
@ -201,6 +202,12 @@ xmrig::CpuThreads xmrig::HwlocCpuInfo::threads(const Algorithm &algorithm) const
processTopLevelCache(cache, algorithm, threads);
}
if (threads.empty()) {
LOG_WARN("hwloc auto configuration for algorithm \"%s\" failed.", algorithm.shortName());
return BasicCpuInfo::threads(algorithm);
}
return threads;
}