nanopool / nanominer

Nanominer is a versatile tool for mining cryptocurrencies on GPUs and CPUs.
https://nanominer.org
638 stars 347 forks source link

command -d detects 0 CUDA devices but can still mine #42

Closed S74nk0 closed 5 years ago

S74nk0 commented 5 years ago

miner version 1.5.2

Hello. I am developing a plugin for NiceHashMiner to support your nanominer.

1. NVIDIA only machine

Now when running nanominer.exe -d it results in Detected 0 devices. But I can still run the miners on this same machine here is the snippet of the log:

2019-07-23 11:18:18: <info>                                    _                 
2019-07-23 11:18:18: <info>  _ __   __ _ _ __   ___  _ __ ___ (_)_ __   ___ _ __ 
2019-07-23 11:18:18: <info> | '_ \ / _` | '_ \ / _ \| '_ ` _ \| | '_ \ / _ \ '__|
2019-07-23 11:18:18: <info> | | | | (_| | | | | (_) | | | | | | | | | |  __/ |   
2019-07-23 11:18:18: <info> |_| |_|\__,_|_| |_|\___/|_| |_| |_|_|_| |_|\___|_|   
2019-07-23 11:18:18: <info> 
2019-07-23 11:18:18: <info> Version 1.5.2
2019-07-23 11:18:18: <info> Started EthMan server on port 3333 without a password (read-only mode).
2019-07-23 11:18:18: <info> Started web interface on port 4000 without a password.
2019-07-23 11:18:18: <info> CUDA driver version is 10.1, runtime version is 10.0
2019-07-23 11:18:18: <info> Detected 2 devices
2019-07-23 11:18:18: <info> GPU 0 PCI 01:00.0, Platform: CUDA, Name: GeForce GTX 1070 Ti, 8192 MB available
2019-07-23 11:18:18: <info> GPU 1 PCI 02:00.0, Platform: CUDA, Name: GeForce GTX 1070 Ti, 8192 MB available
2019-07-23 11:18:18: <info> ----------------CryptoNightR:---------------
2019-07-23 11:18:18: <info> Currency: Monero
2019-07-23 11:18:18: <info> Wallet: 33hGFJZQAfbdzyHGqhJPvZwncDjUBdZqjW
2019-07-23 11:18:18: <info> Rig name: Doc_8ff07078
2019-07-23 11:18:18: <info> Email was not set.
2019-07-23 11:18:18: <info> Hashrate threshold to restart miner is not set
2019-07-23 11:18:18: <info> Added pool: cryptonightr.eu-new.nicehash.com:3375
2019-07-23 11:18:18: <info> Auto pool sorting is disabled
2019-07-23 11:18:18: <info> Devices: 0
2019-07-23 11:18:18: <info> -------------Common parameters:-------------
2019-07-23 11:18:18: <info> Log path: ./logs/
2019-07-23 11:18:18: <info> Log is written to file
2019-07-23 11:18:18: <info> GPU watchdog is disabled
2019-07-23 11:18:18: <info> Never calling reboot.bat (always restarting the miner in case of errors). 
2019-07-23 11:18:18: <info> Setting up algorithm: CryptoNightR
2019-07-23 11:18:20: <info> Connecting to pools...
2019-07-23 11:18:20: <info> Connected to pool: cryptonightr.eu-new.nicehash.com:3375
2019-07-23 11:18:20: <info> New job from cryptonightr.eu-new.nicehash.com:3375 | share difficulty = 200008
2019-07-23 11:18:20: [Statistics] Monero - Total speed: 0.000 H/s, Total shares: 0 Rejected: 0, Time: 00:01
2019-07-23 11:18:20: [Statistics] GPU0 t=41°C fan 50% power 39.52W. Total power: 39.52W

So when mining the GPUs are detected.

This is a NVIDIA only machine.

2. mixed AMD+NVIDIA machine

When running nanominer.exe -d on a mixed rig this is the result:

Detected 4 devices:
GPU 0  PCI 09:00.0  8176 MB  Radeon RX Vega (gfx900)
GPU 1  PCI 0a:00.0  4096 MB  Radeon RX 560 Series (Baffin)
GPU 2  PCI 0b:00.0  8192 MB  Radeon RX 580 Series (Ellesmere)
GPU 3  PCI 0d:00.0  4096 MB  Radeon RX 560 Series (Baffin)

It doesn't see any CUDA devices. But again when mining the GPUs are detected:

2019-07-23 11:26:54: <info> | '_ \ / _` | '_ \ / _ \| '_ ` _ \| | '_ \ / _ \ '__|
2019-07-23 11:26:54: <info> | | | | (_| | | | | (_) | | | | | | | | | |  __/ |   
2019-07-23 11:26:54: <info> |_| |_|\__,_|_| |_|\___/|_| |_| |_|_|_| |_|\___|_|   
2019-07-23 11:26:54: <info> 
2019-07-23 11:26:54: <info> Version 1.5.2
2019-07-23 11:26:54: <info> Started EthMan server on port 3333 without a password (read-only mode).
2019-07-23 11:26:54: <info> Started web interface on port 4000 without a password.
2019-07-23 11:26:54: <info> CUDA driver version is 10.1, runtime version is 10.0
2019-07-23 11:26:55: <info> Detected 6 devices
2019-07-23 11:26:55: <info> GPU 0 PCI 06:00.0, Platform: CUDA, Name: GeForce GTX 1060 3GB, 3072 MB available
2019-07-23 11:26:55: <info> GPU 1 PCI 09:00.0, Platform: OpenCL, Name: Radeon RX Vega (gfx900), 8176 MB available
2019-07-23 11:26:55: <info> GPU 2 PCI 0a:00.0, Platform: OpenCL, Name: Radeon RX 560 Series (Baffin), 4096 MB available
2019-07-23 11:26:55: <info> GPU 3 PCI 0b:00.0, Platform: OpenCL, Name: Radeon RX 580 Series (Ellesmere), 8192 MB available
2019-07-23 11:26:55: <info> GPU 4 PCI 0c:00.0, Platform: CUDA, Name: GeForce GTX 1060 3GB, 3072 MB available
2019-07-23 11:26:55: <info> GPU 5 PCI 0d:00.0, Platform: OpenCL, Name: Radeon RX 560 Series (Baffin), 4096 MB available
2019-07-23 11:26:55: <info> ----------------CryptoNightR:---------------

3. Feature request to dump data in JSON or easy to parse format.

Since nanominer uses it's own device indexing it would be beneficial for nhm to call nanominer.exe -dnhm and it would dump all detected devices in a JSON array where one could see the miner index and PCI of the device. This is how nhm reliably maps it's device detection with any miner

S74nk0 commented 5 years ago

The 3. Feature request to dump data in JSON or easy to parse format. is not really that important since we can already parse the existing output. It is just that CUDA doesn't get printed with -d command and this will not reliably map devices that are missing.

Grumpy-Dwarf commented 5 years ago

Hello @S74nk0, sorry for long delay. Nanominer's order of devices is PCI buss address order. There was a bug in recent versions which caused nanominer -d to ignore Nvidia devices, it's fixed now with release 1.5.3. Please check if it works as expected on your rig.

S74nk0 commented 5 years ago

@Grumpy-Dwarf Works now! Thanks.