大家好,我是考100分的小小码 ,祝大家学习进步,加薪顺利呀。今天说一说关于xmr(Monero)门罗币使用xmrig-N卡+CUP挖矿时提示CUDA disabled (libxmrig-cuda.so: API version[亲测有效],希望您对编程的造诣更进一步.
如下图所示
huangbin@huangbin-ubuntu:~/xmrig-6.8.2$ ./xmrig
* ABOUT XMRig/6.8.2 gcc/9.3.0
* LIBS libuv/1.40.0 OpenSSL/1.1.1i hwloc/2.4.0
* HUGE PAGES supported
* 1GB PAGES disabled
* CPU Intel(R) Xeon(R) CPU L5640 @ 2.27GHz (1) 64-bit AES
L2:1.5 MB L3:12.0 MB 6C/12T NUMA:1
* MEMORY 1.2/31.4 GB (4%)
* DONATE 1%
* ASSEMBLY auto:intel
* POOL #1 xmr.2miners.com:3333 algo auto
* COMMANDS hashrate, pause, resume, results, connection
* OPENCL disabled
* CUDA disabled (/home/huangbin/xmrig-6.8.2/libxmrig-cuda.so: cannot open shared object file: No such file or directory)
[2021-02-21 19:33:22.035] net use pool xmr.2miners.com:3333 51.89.96.41
[2021-02-21 19:33:22.035] net new job from xmr.2miners.com:3333 diff 840009 algo rx/0 height 2301641
[2021-02-21 19:33:22.035] cpu use argon2 implementation SSSE3
[2021-02-21 19:33:22.040] msr msr kernel module is not available
[2021-02-21 19:33:22.040] msr FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW
[2021-02-21 19:33:22.040] randomx init dataset algo rx/0 (12 threads) seed 3dd2ca52a2bd9292...
[2021-02-21 19:33:22.040] randomx allocated 2336 MB (2080+256) huge pages 0% 0/1168 +JIT (0 ms)
[2021-02-21 19:33:28.337] randomx dataset ready (6296 ms)
[2021-02-21 19:33:28.337] cpu use profile rx (6 threads) scratchpad 2048 KB
* CUDA disabled (/home/huangbin/xmrig-6.8.2/libxmrig-cuda.so: cannot open shared object file: No such file or directory)
[2021-02-21 19:33:28.340] cpu READY threads 6/6 (6) huge pages 0% 0/6 memory 12288 KB (3 ms)
[2021-02-21 19:33:30.864] signal Ctrl+C received, exiting
[2021-02-21 19:33:30.868] cpu stopped (4 ms)
是因为缺少 libxmrig-cuda.so 链接库的原因所致
github.com/xmrig/xmrig… 该github包有提示,xmrig挖矿必须安装cuda支持插件libxmrig-cuda.so
windows版本有直接下载xmrig-cuda.dll对应cuda版本的插件,放在和xmrig.exe同级目录即可
Linux版本需要使用cmake编译成libxmrig-cuda.so
huangbin@huangbin-ubuntu:~/xmrig-6.8.2$ git clone https://github.com/xmrig/xmrig-cuda.git
huangbin@huangbin-ubuntu:~/xmrig-6.8.2$ cd xmrig-cuda/
huangbin@huangbin-ubuntu:~/xmrig-6.8.2/xmrig-cuda$ mkdir build && cd build
huangbin@huangbin-ubuntu:~/xmrig-6.8.2/xmrig-cuda$cd build
#生产编译配置文件
huangbin@huangbin-ubuntu:~/xmrig-6.8.2/xmrig-cuda/build$ cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.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 pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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-11.0 (found suitable version "11.0", minimum required is "8.0")
-- Looking for __builtin___clear_cache
-- Looking for __builtin___clear_cache - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/huangbin/xmrig-6.8.2/xmrig-cuda/build
#等待安装完成100%
huangbin@huangbin-ubuntu:~/xmrig-6.8.2/xmrig-cuda/build$ make
[ 6%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o
[ 12%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o
#拷贝libxmrig-cuda.so到xmrig运行目录
huangbin@huangbin-ubuntu:~/xmrig-6.8.2/xmrig-cuda/build$ mv libxmrig-cuda.so ~/xmrig-6.8.2
huangbin@huangbin-ubuntu:~/xmrig-6.8.2/xmrig-cuda/build$ cd ~/xmrig-6.8.2 && ./xmrig
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/13818.html