xmrig / xmrig-nvidia

Monero (XMR) NVIDIA miner
GNU General Public License v3.0
705 stars 261 forks source link

nvcc fatal : Unsupported gpu architecture 'compute_30' #339

Open zehrealmrmeow opened 2 years ago

zehrealmrmeow commented 2 years ago

I have checked out the latest revision and when I try make I get the following error:

$ make [ 1%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o nvcc fatal : Unsupported gpu architecture 'compute_30' CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.Release.cmake:220 (message): Error generating /home/t/crypto/xmrig-nvidia/cmake/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.o

make[2]: [CMakeFiles/xmrig-cuda.dir/build.make:91: CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o] Error 1 make[1]: [CMakeFiles/Makefile2:153: CMakeFiles/xmrig-cuda.dir/all] Error 2 make: *** [Makefile:103: all] Error 2

I am running the following OS: $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

My NVIDIA driver is: $ nvidia-smi -l Sun Feb 13 15:57:50 2022
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 510.39.01 Driver Version: 510.39.01 CUDA Version: 11.6 |

My NVIDIA card is: $ lshw *-display description: VGA compatible controller product: TU116 [GeForce GTX 1660 Ti] vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:07:00.0 version: a1 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress vga_controller bus_master cap_list rom configuration: driver=nvidia latency=0 resources: irq:83 memory:fb000000-fbffffff memory:d0000000-dfffffff memory:e0000000-e1ffffff ioport:e000(size=128) memory:fc000000-fc07ffff

After googling it out I was able to find (not many) similar posts yet the one that came the closest to this problem was: https://github.com/flashlight/flashlight/issues/198

I have of course tried to inspire myself off this article but to no avail. I understand that I would need to add "-gencode arch=compute_30,code=sm_30" somewhere under CMakeLists.txt, possibly in: option(WITH_AEON "CryptoNight-Lite support" ON) option(WITH_SUMO "CryptoNight-Heavy support" ON) option(WITH_CN_PICO "CryptoNight-Pico support" ON) option(WITH_CN_GPU "CryptoNight-GPU support" ON) option(WITH_HTTPD "HTTP REST API" ON) option(WITH_DEBUG_LOG "Enable debug log output" OFF) option(WITH_TLS "Enable OpenSSL support" ON) option(WITH_ASM "Enable ASM PoW implementations" ON) option(BUILD_STATIC "Build static binary" OFF) option(ARM_TARGET "Force use specific ARM target 8 or 7" 0)

But at this point I am beyond my head.

Can anybody help me out getting xmrig-nvidia running on my system? And/or will future revisions support/fix what I am trying to accomplish?

ghost commented 2 years ago

cmake .. -DCUDA_ARCH="35" -DWITH_HTTPD=OFF -DWITH_AEON=OFF should get you around it, I had a similar issue.

zehrealmrmeow commented 2 years ago

[...] [ 87%] Building C object CMakeFiles/xmrig-nvidia.dir/src/crypto/c_jh.c.o /home/t/crypto/xmrig-nvidia/src/crypto/c_jh.c: In function ‘jh_hash’: /home/t/crypto/xmrig-nvidia/src/crypto/c_jh.c:219:56: warning: ‘state.x[0][0]’ may be used uninitialized in this function [-Wmaybe-uninitialized] 219 | for (i = 0; i < 8; i++) state->x[i >> 1][i & 1] ^= ((uint64*)state->buffer)[i]; | ^~ [ 89%] Building C object CMakeFiles/xmrig-nvidia.dir/src/crypto/c_skein.c.o [ 90%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/crypto/CryptoNight.cpp.o [ 92%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/crypto/CryptonightR_gen.cpp.o [ 93%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/common/log/SysLog.cpp.o [ 95%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/common/net/Tls.cpp.o [ 96%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/crypto/cn_gpu_avx.cpp.o [ 98%] Building CXX object CMakeFiles/xmrig-nvidia.dir/src/crypto/cn_gpu_ssse3.cpp.o [100%] Linking CXX executable xmrig-nvidia [100%] Built target xmrig-nvidia $

That properly fixed it! THANK YOU <3

However I am never able to start the PID: $ ./xmrig-nvidia --donate-level 5 -o poolip:poolport -u myusername -p x -k [2022-02-17 15:32:17] "cryptonight" hash self-test failed. $

After duckducking it out the closest match that I was about to find was this but it ended up as a bug fix in 2018 for xmrig: https://github.com/xmrig/xmrig-amd/issues/131

zehrealmrmeow commented 2 years ago

PS: same problem if I use the following config.json based off config.xmrig.org which is referred from the original XMR github:

{ "algo": "cryptonight", "api": { "port": 0, "access-token": null, "id": null, "worker-id": null, "ipv6": false, "restricted": true }, "background": false, "colors": true, "cuda-bfactor": 0, "cuda-bsleep": 0, "cuda-max-threads": 64, "donate-level": 5, "log-file": null, "pools": [ { "url": "xmr-us-east1.nanopool.org:14433", "user": "mywalletidhere", "pass": "x", "rig-id": null, "nicehash": false, "keepalive": true, "variant": -1, "enabled": true, "tls": true, "tls-fingerprint": null } ], "print-time": 60, "retries": 5, "retry-pause": 5, "threads": [ { "index": 0, "threads": 38, "blocks": 72, "bfactor": 0, "bsleep": 0, "sync_mode": 3, "affine_to_cpu": false } ], "user-agent": null, "syslog": false, "watch": true }

ghost commented 2 years ago

If you absolutely must do this, here's how.

./xmrig-nvidia -o randomxmonero.eu-west.nicehash.com:3380 -u 3MzMtMvTWUXtNS4WmKcUoRbPmfJKHuRXTM.ifyoudothisyouaresilly -p x -k --nicehash



While it does work, and you can get even very old GPUs mining, it's absolutely NOT worth it.

For reference, I tried mining with a passively cooled Nvidia GT 710. The GPU pulled around 5w in exchange for a consistent _19.5 H/s_. Note **hashes** per second, not kH/s. It'd make about a cent a month in revenue. There's also the side-effect of the CPU overhead, near enough maxing out a single thread constantly thus further pushing up the total power draw into the 10-15w range. Though it's far more likely that your terrible hashrate will mean your jobs are so old by the time you've finished with them you'll get rejected every single time.

Just for clarity on how bad GPU mining Monero is, you'd need a _thousand GT 710s_ to have a $10/month revenue. Plus an electricity bill somewhere in the $2,000/month range.

Have fun!

P.S: If you're not just screwing around, what you actually want is here https://github.com/xmrig/xmrig-cuda
Spudz76 commented 2 years ago

This project has been abandoned after the fork to xmrig-cuda plugin for normal xmrig

You will all have much better luck using actually supported software. This is dead since 2019.