fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

Cuda architecture 50 not working. #130

Closed anhphan closed 6 years ago

anhphan commented 6 years ago

I try compile with this option:

cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. -DWIN_UAC=OFF -DCUDA_ARCH=50;61

But when run with GTX 750 Ti, I receive this error:

WARNING: NVIDIA GPU 1: miner not compiled for the gpu architecture 50.

It's work well with 1070 (arch 61). The backend file size is about 3MB, mean it actual compile for 2 ARCH (as I remember, if only compile for 1 ARCH, backend will have file size about 1.6MB)

psychocrypt commented 6 years ago

please run xmr-stak -V that know that you are on the latest version.

anhphan commented 6 years ago

The output of xmr-stak -V:

Version: xmr-stak/2.0.0/214a00c/dev/win/nvidia-amd-cpu/aeon-monero/0

I have just build it today from dev branch

psychocrypt commented 6 years ago

Please also post your nvidia.txt

Am 17.11.2017 7:45 Vorm. schrieb "psychocrypt" psychocrypthpc@gmail.com:

please run xmr-stak -V that know that you are on the latest version.

anhphan commented 6 years ago

nvidia.txt


"gpu_threads_conf" :
[

  // gpu: GeForce GTX 750 Ti architecture: 50
  //      memory: 6797/8192 MiB
  { "index" : 1,
    "threads" : 48, "blocks" : 5,
    "bfactor" : 8, "bsleep" :  0,
    "affine_to_cpu" : false,
  },

],

It's run fine with older build (I have one build from before aeon added). If I remove nvidia.txt, it's also cannot make suggestion for that card, only create suggestion for 1070 only.

psychocrypt commented 6 years ago

Please remove the file nvidia.txt and run the miner again. Than please post all output from the terminal.

anhphan commented 6 years ago
xmr-stak.exe -c config-aeon.txt --noCPU --noAMD --nvidia new.txt
[2017-11-17 13:58:24] : MEMORY ALLOC FAILED: VirtualAlloc failed. Reboot might help.
[2017-11-17 13:58:24] : MEMORY ALLOC FAILED: VirtualAlloc failed. Reboot might help.
-------------------------------------------------------------------
xmr-stak 2.0.0 214a00c

Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).
Based on NVIDIA mining code by KlausT and psychocrypt.
Based on OpenCL mining code by wolf9466.

Configurable dev donation level is set to 0.0%

You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2017-11-17 13:58:24] : Start mining: AEON
WARNING: NVIDIA GPU 1: miner not compiled for the gpu architecture 50.
[2017-11-17 13:58:24] : WARNING: NVIDIA setup failed for GPU 1.

[2017-11-17 13:58:24] : NVIDIA: GPU configuration stored in file 'new.txt'
[2017-11-17 13:58:24] : Starting NVIDIA GPU thread 0, no affinity.
[2017-11-17 13:58:24] : Fast-connecting to tokyo01.aeon.hashvault.pro:7777 pool ...
[2017-11-17 13:58:24] : MEMORY ALLOC FAILED: VirtualAlloc failed.
[2017-11-17 13:58:24] : Fast-connecting to frankfurt01.aeon.hashvault.pro:7777 pool ...
[2017-11-17 13:58:24] : Fast-connecting to chicago01.aeon.hashvault.pro:7777 pool ...
[2017-11-17 13:58:24] : Pool tokyo01.aeon.hashvault.pro:7777 connected. Logging in...
[2017-11-17 13:58:25] : Pool chicago01.aeon.hashvault.pro:7777 connected. Logging in...
[2017-11-17 13:58:25] : Difficulty changed. Now: 20000.
[2017-11-17 13:58:25] : Pool logged in.
[2017-11-17 13:58:25] : Pool frankfurt01.aeon.hashvault.pro:7777 connected. Logging in...
[CUDA] Error gpu 0: <D:/temp/test/xmr-stak/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu>:322

The content generated to new.txt:


/*
 * GPU configuration. You should play around with threads and blocks as the fastest settings will vary.
 * index         - GPU index number usually starts from 0.
 * threads       - Number of GPU threads (nothing to do with CPU threads).
 * blocks        - Number of GPU blocks (nothing to do with CPU threads).
 * bfactor       - Enables running the Cryptonight kernel in smaller pieces.
 *                 Increase if you want to reduce GPU lag. Recommended setting on GUI systems - 8
 * bsleep        - Insert a delay of X microseconds between kernel launches.
 *                 Increase if you want to reduce GPU lag. Recommended setting on GUI systems - 100
 * affine_to_cpu - This will affine the thread to a CPU. This can make a GPU miner play along nicer with a CPU miner.
 *
 * On the first run the miner will look at your system and suggest a basic configuration that will work,
 * you can try to tweak it from there to get the best performance.
 *
 * A filled out configuration should look like this:
 * "gpu_threads_conf" :
 * [
 *     { "index" : 0, "threads" : 17, "blocks" : 60, "bfactor" : 0, "bsleep" :  0, "affine_to_cpu" : false},
 * ],
 */

"gpu_threads_conf" :
[
  // gpu: GeForce GTX 1070 architecture: 61
  //      memory: 6795/8192 MiB
  //      smx: 15
  { "index" : 0,
    "threads" : 146, "blocks" : 45,
    "bfactor" : 6, "bsleep" :  25,
    "affine_to_cpu" : false,
  },

],
psychocrypt commented 6 years ago

could you go please into the build folder and run cmake . -L

anhphan commented 6 years ago

D:\temp\test\xmr-stak\build>cmake .. -L

-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.11.25547.0
-- The CXX compiler identification is MSVC 19.11.25547.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Set miner currency to 'monero' and 'aeon'
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0 (found suitable version "9.0", minimum required is "7.5")
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - found
-- Found OpenCL: C:/Program Files (x86)/AMD APP SDK/3.0/lib/x86_64/OpenCL.lib (found version "2.0")
-- Found OpenSSL: C:/xmr-stak-dep/openssl/lib/libeay32.lib (found version "1.0.2l")
-- Configuring done
-- Generating done
-- Build files have been written to: D:/temp/test/xmr-stak/build
-- Cache values
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=D:/temp/test/xmr-stak/build
CMAKE_LINK_STATIC:BOOL=OFF
CPU_ENABLE:BOOL=ON
CUDA_ARCH:STRING=30;35;37;50;52;60;61;62;70
CUDA_COMPILER:STRING=nvcc
CUDA_ENABLE:BOOL=ON
CUDA_HOST_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe
CUDA_KEEP_FILES:BOOL=OFF
CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND
CUDA_SHOW_CODELINES:BOOL=OFF
CUDA_SHOW_REGISTER:BOOL=OFF
CUDA_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0
CUDA_USE_STATIC_CUDA_RUNTIME:BOOL=ON
HWLOC:FILEPATH=C:/xmr-stak-dep/hwloc/lib/libhwloc.lib
HWLOC_ENABLE:BOOL=ON
HWLOC_INCLUDE_DIR:PATH=C:/xmr-stak-dep/hwloc/include
LIB_EAY_DEBUG:FILEPATH=LIB_EAY_DEBUG-NOTFOUND
LIB_EAY_RELEASE:FILEPATH=C:/xmr-stak-dep/openssl/lib/libeay32.lib
MHTD:FILEPATH=C:/xmr-stak-dep/libmicrohttpd/lib/libmicrohttpd.lib
MICROHTTPD_ENABLE:BOOL=ON
MTHD_INCLUDE_DIR:PATH=C:/xmr-stak-dep/libmicrohttpd/include
OpenCL_ENABLE:BOOL=ON
OpenSSL_ENABLE:BOOL=ON
SSL_EAY_DEBUG:FILEPATH=SSL_EAY_DEBUG-NOTFOUND
SSL_EAY_RELEASE:FILEPATH=C:/xmr-stak-dep/openssl/lib/ssleay32.lib
WIN_UAC:BOOL=ON
XMR-STAK_CURRENCY:STRING=all
XMR-STAK_LARGEGRID:BOOL=ON
XMR-STAK_THREADS:STRING=0
psychocrypt commented 6 years ago

Do you run the last command in an clean directory. Because the output shows that all architectures will be build. In that case please compile again dor two architectures. Run cmake . -L after the compile. Please use not .. Try the new build. If this is not working I need to reproduce it on my system.

anhphan commented 6 years ago

After clean build with command:

cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 .. -DWIN_UAC=OFF -DCUDA_ARCH=50;61
cmake --build . --config Release --target install

Output of cmake . -L:

-- Set miner currency to 'monero' and 'aeon'
-- Configuring done
-- Generating done
-- Build files have been written to: D:/temp/test/xmr-stak/build
-- Cache values
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=D:/temp/test/xmr-stak/build
CMAKE_LINK_STATIC:BOOL=OFF
CPU_ENABLE:BOOL=ON
CUDA_ARCH:STRING=50;61
CUDA_COMPILER:STRING=nvcc
CUDA_ENABLE:BOOL=ON
CUDA_HOST_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe
CUDA_KEEP_FILES:BOOL=OFF
CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND
CUDA_SHOW_CODELINES:BOOL=OFF
CUDA_SHOW_REGISTER:BOOL=OFF
CUDA_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0
CUDA_USE_STATIC_CUDA_RUNTIME:BOOL=ON
HWLOC:FILEPATH=C:/xmr-stak-dep/hwloc/lib/libhwloc.lib
HWLOC_ENABLE:BOOL=ON
HWLOC_INCLUDE_DIR:PATH=C:/xmr-stak-dep/hwloc/include
LIB_EAY_DEBUG:FILEPATH=LIB_EAY_DEBUG-NOTFOUND
LIB_EAY_RELEASE:FILEPATH=C:/xmr-stak-dep/openssl/lib/libeay32.lib
MHTD:FILEPATH=C:/xmr-stak-dep/libmicrohttpd/lib/libmicrohttpd.lib
MICROHTTPD_ENABLE:BOOL=ON
MTHD_INCLUDE_DIR:PATH=C:/xmr-stak-dep/libmicrohttpd/include
OpenCL_ENABLE:BOOL=ON
OpenSSL_ENABLE:BOOL=ON
SSL_EAY_DEBUG:FILEPATH=SSL_EAY_DEBUG-NOTFOUND
SSL_EAY_RELEASE:FILEPATH=C:/xmr-stak-dep/openssl/lib/ssleay32.lib
WIN_UAC:BOOL=OFF
XMR-STAK_CURRENCY:STRING=all
XMR-STAK_LARGEGRID:BOOL=ON
XMR-STAK_THREADS:STRING=0

Copy the new build to target machine, and still run failed with same error.

anhphan commented 6 years ago

have just check out to commit d35893d926c74893d7c85d1b87b24ffa55744649 and rebuild, it working fine on that commit. Something is broken after that.

anhphan commented 6 years ago

Found the commit make broken is: 70737c8d1a909c6d08f6e38e069566ae8af64917 Previous commit: 0659458523671d53e4eddd940ade8ac9f72b1bbe is run fine.

psychocrypt commented 6 years ago

Thx for pointing to the commit. I can reproduce the issue and will fix it soon.

psychocrypt commented 6 years ago

Your issue is fixed with #133 and #132

psychocrypt commented 6 years ago

btw: Do not forget to re-enable the dev donation ;-)