fireice-uk / xmr-stak

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

std::runtime_error [CUDA] Error: invalid configuration argument #836

Closed xihesi closed 6 years ago

xihesi commented 6 years ago

Please provide as much as possible information to reproduce the issue.

Basic information

GPU : GT 710 OS: Ubuntu 16.04 LTS (Xenial Xerus) 64bit. CUDA: 9.1

Compile issues

 cmake -DCUDA_ENABLE=ON -DOpenCL_ENABLE= OFF ..
-- Set miner currency to 'monero' and 'aeon'
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g")
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
-- Configuring done
-- Generating done
-- Build files have been written to: /root/xmr-stak-2.2.0/build
make
Scanning dependencies of target xmr-stak-c
[  3%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o
[  6%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o
[ 10%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o
[ 13%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o
[ 16%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o
[ 20%] Linking C static library bin/libxmr-stak-c.a
[ 20%] Built target xmr-stak-c
Scanning dependencies of target xmr-stak-backend
[ 23%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o
[ 26%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o
[ 30%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o
[ 33%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o
[ 36%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o
[ 40%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o
[ 43%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o
[ 46%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o
[ 50%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o
[ 53%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o
[ 56%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o
[ 60%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o
[ 63%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o
[ 66%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o
[ 70%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o
[ 73%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o
[ 76%] Linking CXX static library bin/libxmr-stak-backend.a
[ 76%] Built target xmr-stak-backend
[ 80%] Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/bac[ 83%] Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_core.cu.o
Scanning dependencies of target xmrstak_cuda_backend
[ 86%] Building CXX object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/jconf.cpp.o
[ 90%] Building CXX object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/minethd.cpp.o
[ 93%] Linking CXX shared library bin/libxmrstak_cuda_backend.so
[ 93%] Built target xmrstak_cuda_backend
Scanning dependencies of target xmr-stak
[ 96%] Building CXX object CMakeFiles/xmr-stak.dir/xmrstak/cli/cli-miner.cpp.o
[100%] Linking CXX executable bin/xmr-stak
[100%] Built target xmr-stak

Issue with the execution

  Version: xmr-stak/2.2.0/c4400d19/unknown/lin/nvidia-cpu/aeon-monero/20
Configuration stored in file 'config.txt'
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
-------------------------------------------------------------------
xmr-stak 2.2.0 c4400d19

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.

Configurable dev donation level is set to 2.0%

You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2018-01-08 17:28:09] : Start mining: MONERO
[2018-01-08 17:28:09] : NVIDIA: GPU configuration stored in file 'nvidia.txt'
[2018-01-08 17:28:09] : Starting NVIDIA GPU thread 0, no affinity.
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : CPU configuration stored in file 'cpu.txt'
[2018-01-08 17:28:09] : Starting 1x thread, affinity: 0.
[2018-01-08 17:28:09] : hwloc: memory pinned
[2018-01-08 17:28:09] : Starting 1x thread, affinity: 1.
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : hwloc: memory pinned
[2018-01-08 17:28:09] : Starting 1x thread, affinity: 2.
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : hwloc: memory pinned
[2018-01-08 17:28:09] : Starting 1x thread, affinity: 3.
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : hwloc: memory pinned
[2018-01-08 17:28:09] : MEMORY ALLOC FAILED: mmap failed
[2018-01-08 17:28:09] : Fast-connecting to fr.minexmr.com:4444 pool ...
[2018-01-08 17:28:09] : Pool fr.minexmr.com:4444 connected. Logging in...
[2018-01-08 17:28:10] : Difficulty changed. Now: 15000.
[2018-01-08 17:28:10] : Pool logged in.
[CUDA] Error gpu 0: </root/xmr-stak-2.2.0/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu>:322
terminate called after throwing an instance of 'std::runtime_error'
  what():  [CUDA] Error: invalid configuration argument
Aborted (core dumped)

nvidia.txt

"gpu_threads_conf" :
[
  // gpu: GeForce GT 710 architecture: 35
  //      memory: 956/979 MiB
  //      smx: 1
  { "index" : 0,
    "threads" : 136, "blocks" : 3,
    "bfactor" : 2, "bsleep" :  0,
    "affine_to_cpu" : false, "sync_mode" : 3,
  },

],
psychocrypt commented 6 years ago

Could you please try to increase bfactor to 4 or 5.

psychocrypt commented 6 years ago

Ahh OK I get it. You can not set threads higher than 128. I will add a patch to the dev soon that a clean error massage is shown.

xihesi commented 6 years ago

Yea. I modify threads to 126, it can work and not modify bfactor. So how to modify the performance of the more number?

leonlumsden commented 6 years ago

I realised it happens if I've been using another miner previously.... So I need to do a restart every time I want to use xmr stak