From b2dbde1ed41e2de68a8ec409e0614e6aadc335a0 Mon Sep 17 00:00:00 2001 From: Jonano Date: Mon, 12 Feb 2018 01:00:32 +0300 Subject: [PATCH] Version 0.2.3 --- GpuMiner/Core/MinerManager.cpp | 6 +++--- GpuMiner/Core/MinerManager.h | 2 +- GpuMiner/MinerEngine/CLMiner.cpp | 2 +- GpuMiner/version.h | 2 +- README.md | 8 +++++--- version_history.txt | 3 +++ 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/GpuMiner/Core/MinerManager.cpp b/GpuMiner/Core/MinerManager.cpp index 5bfdb14..f7b7784 100644 --- a/GpuMiner/Core/MinerManager.cpp +++ b/GpuMiner/Core/MinerManager.cpp @@ -162,7 +162,7 @@ bool MinerManager::InterpretOption(int& i, int argc, char** argv) } else if(arg == "-opencl-cpu") { - _useOpenCpu = true; + _useOpenClCpu = true; } else if(arg == "-nvidia-fix") { @@ -181,7 +181,7 @@ void MinerManager::Execute() { if((_minerType & MinerType::CL) == MinerType::CL) { - CLMiner::ListDevices(_useOpenCpu); + CLMiner::ListDevices(_useOpenClCpu); } if((_minerType & MinerType::CPU) == MinerType::CPU) { @@ -391,7 +391,7 @@ void MinerManager::ConfigureGpu() _localWorkSize, _globalWorkSizeMultiplier, _openclPlatform, - _useOpenCpu)) + _useOpenClCpu)) { exit(1); } diff --git a/GpuMiner/Core/MinerManager.h b/GpuMiner/Core/MinerManager.h index 067e47f..6aa722a 100644 --- a/GpuMiner/Core/MinerManager.h +++ b/GpuMiner/Core/MinerManager.h @@ -70,7 +70,7 @@ class MinerManager unsigned _openclSelectedKernel = 0; ///< A numeric value for the selected OpenCL kernel unsigned _openclDeviceCount = 0; unsigned _openclDevices[MAX_CL_DEVICES]; - bool _useOpenCpu = false; + bool _useOpenClCpu = false; unsigned _globalWorkSizeMultiplier = CLMiner::_defaultGlobalWorkSizeMultiplier; unsigned _localWorkSize = CLMiner::_defaultLocalWorkSize; bool _useNvidiaFix = false; diff --git a/GpuMiner/MinerEngine/CLMiner.cpp b/GpuMiner/MinerEngine/CLMiner.cpp index ce9efba..17203a5 100644 --- a/GpuMiner/MinerEngine/CLMiner.cpp +++ b/GpuMiner/MinerEngine/CLMiner.cpp @@ -551,7 +551,7 @@ void CLMiner::WorkLoop() bool hasSolution = false; if(loopCounter > 0) { - // Read results. + // Read results. ReadData(results); //miner return an array with 17 64-bit values. If nonce for hash lower than target hash is found - it is written to array. diff --git a/GpuMiner/version.h b/GpuMiner/version.h index e82f0d9..e1dd667 100644 --- a/GpuMiner/version.h +++ b/GpuMiner/version.h @@ -3,7 +3,7 @@ #define VERSION_MAJOR 0 #define VERSION_MINOR 2 -#define VERSION_REVISION 2 +#define VERSION_REVISION 3 #define VER_FILE_DESCRIPTION_STR "Standalone GPU/CPU miner for Dagger coin" #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION diff --git a/README.md b/README.md index be28780..87b43e4 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,16 @@ Linux: AMD driver / SDK link https://developer.amd.com/amd-accelerated-parallel-processing-app-sdk/ Nvidia driver / SDK link https://developer.nvidia.com/cuda-downloads -Check dependencies:libboost-dev, libboost-system-dev, openssl +Check dependencies: libboost-dev, libboost-system-dev, openssl. -Download this source code, then cd to source folder. -In GpuMiner folder run command $make all, it will generate xdag-gpu +Download this source code, then cd to source folder. In GpuMiner folder run command $make all, it will generate xdag-gpu. Launch parameters: 1) GPU benchmark: ./xdag-gpu -G -M 2) GPU mining: ./xdag-gpu -G -a -p 3) CPU mining: ./xdag-gpu -cpu -a -p -t 8 +Workaround on issue with high CPU usage with NVIDIA GPUs. +There is an issue with NVIDIA GPUs leading to very high CPU usage. The reason is improper implementation of OpenCL by NVIDIA. When CPU thread waits for results from GPU, it does not stop, it spins in loop eating CPU resources for nothing. +There was impemented a workaround on this issue: before reading results from GPU current thread sleeps during small calculated time. CPU usage was decreased in 90%. The change made optional, use launch parameter "-nvidia-fix" to enable it. The change can decrease hashrate a bit in some cases. But GPU rigs should gain increase of hashrate. So try it and choose to use or not to use it. You can support author: XDAG gKNRtSL1pUaTpzMuPMznKw49ILtP6qX3 diff --git a/version_history.txt b/version_history.txt index 5816a16..2b7d7aa 100644 --- a/version_history.txt +++ b/version_history.txt @@ -1,3 +1,6 @@ +0.2.3 +- workaround on issue with high cpu usage with NVIDIA cards is implemented. By default workaround is disabled, use "-nvidia-fix" parameter to enable it. The change can decrease hashrate a bit. + 0.2.2 - a number of optimizations. Performance of mining was increased. Increase for AMD GPUs is about 20%, for NVIDIA GPU increase is low.