Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA Plugin not working #23

Closed
cdndcminer opened this issue Dec 3, 2019 · 3 comments
Closed

CUDA Plugin not working #23

cdndcminer opened this issue Dec 3, 2019 · 3 comments

Comments

@cdndcminer
Copy link

cdndcminer commented Dec 3, 2019

Running XMRIG By CLI: ./xmrig --donate-level 3 --cuda -o pool.minexmr.com:443 -u --coin monero -k --tls
OS: Ubuntu 18.04
CUDA: Cuda compilation tools, release 10.1, V10.1.243

NVIDIA Driver:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 NVS 510 Off | 00000000:03:00.0 N/A | N/A |
| 28% 34C P8 N/A / N/A | 184MiB / 1998MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
| 1 NVS 510 Off | 00000000:04:00.0 N/A | N/A |
| 28% 29C P8 N/A / N/A | 1MiB / 1999MiB | N/A Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
| 1 Not Supported |
+-----------------------------------------------------------------------------+

Compile CUDA Plugin:
/xmrig-cuda/build$ cmake .. -DCUDA_LIB=/usr/local/cuda/lib64/stubs/libcuda.so
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for __builtin___clear_cache
-- Looking for __builtin___clear_cache - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found suitable version "10.1", minimum required is "8.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/Miner/xmrig-cuda/build
miner@miner:
/xmrig-cuda/build$ make -j$(nproc)
[ 16%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o
[ 16%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/monero/xmrig-cu_generated_randomx_monero.cu.o
[ 25%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/wownero/xmrig-cu_generated_randomx_wownero.cu.o
[ 33%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o
[ 41%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/xmrig-cu_generated_randomx.cu.o
[ 50%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o
[ 58%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/loki/xmrig-cu_generated_randomx_loki.cu.o
/home/miner/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/miner/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/miner/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/miner/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/miner/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/miner/xmrig-cuda/src/cuda_extra.cu: In function ‘int cuda_get_deviceinfo(nvid_ctx*)’:
/home/miner/xmrig-cuda/src/cuda_extra.cu:586:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (ctx->device_blocks > max_blocks) {
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-class-memaccess’
Scanning dependencies of target xmrig-cu
[ 66%] Linking CXX static library libxmrig-cu.a
[ 66%] Built target xmrig-cu
Scanning dependencies of target xmrig-cuda
[ 75%] Building C object CMakeFiles/xmrig-cuda.dir/src/crypto/cn/c_blake256.c.o
[ 83%] Building CXX object CMakeFiles/xmrig-cuda.dir/src/CudaCryptonightR_gen.cpp.o
[ 91%] Building CXX object CMakeFiles/xmrig-cuda.dir/src/xmrig-cuda.cpp.o
[100%] Linking CXX shared library libxmrig-cuda.so
[100%] Built target xmrig-cuda

Now I move the 2 files and run xmrig but xmrig says:

  • ABOUT XMRig/5.1.0 gcc/7.4.0
  • LIBS libuv/1.18.0 OpenSSL/1.1.1 hwloc/1.11.9
  • CPU Intel(R) Xeon(R) CPU E5-1630 v3 @ 3.70GHz (1) x64 AES
    L2:1.0 MB L3:10.0 MB 4C/8T NUMA:1
  • MEMORY 3.2/15.6 GB (21%)
  • DONATE 3%
  • ASSEMBLY auto:intel
  • POOL Cleanup everything in GPU context when releasing it #1 ca.minexmr.com:443 coin monero
  • COMMANDS hashrate, pause, resume
  • OPENCL disabled
  • CUDA disabled (failed to load CUDA plugin)

Can anyone help me get the CUDA Plugin to work on this?

@cdndcminer
Copy link
Author

found the fix had to add: --cuda-loader=./libxmrig-cuda.so

@cyvitor
Copy link

cyvitor commented Aug 11, 2020

Hi!
Plis, Can u post the full command?

@xmrig xmrig closed this as completed Aug 31, 2020
@camzilla1050
Copy link

./xmrig --donate-level 3 --cuda -o pool.minexmr.com:443 -u --coin monero -k --tls --cuda-loader=(PATH)/libxmrig-cuda.so
Or in your xmrig config file (config.json):

"cuda": {
"enabled": true,
"loader": "(PATH)/libxmrig-cuda.so",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants