KlausT / ccminer-cryptonight

Software for mining various cryptocoins, like Monero (pool mining only)
GNU General Public License v3.0
133 stars 30 forks source link

Nonce $number does not validate on CPU #13

Closed deshi-basara closed 7 years ago

deshi-basara commented 7 years ago

os: Archlinux gcc: 6.3.1 (Wrong: Symlink to gcc5 is set) cuda: 8.0.44 card: GTX 1060 version: 2.0

Since your latest updates for Pascal cards, my hash/s went from 420 to 600, but the old nonce $number does not validate on CPU!-problem is back:

[2017-01-15 16:55:57] GPU #0: GeForce GTX 1060 6GB, 602.24 H/s
[2017-01-15 16:56:00] GPU #0: GeForce GTX 1060 6GB, 591.77 H/s
[2017-01-15 16:56:00] accepted: 12/12 (100.00%), 591.77 H/s (yay!!!)
[2017-01-15 16:56:03] GPU #0: result for nonce $00000D9B does not validate on CPU!
[2017-01-15 16:56:12] GPU #0: result for nonce $00002163 does not validate on CPU!
[2017-01-15 16:56:12] GPU #0: GeForce GTX 1060 6GB, 595.75 H/s
[2017-01-15 16:56:12] accepted: 13/13 (100.00%), 595.75 H/s (yay!!!)
[2017-01-15 16:56:22] GPU #0: GeForce GTX 1060 6GB, 602.37 H/s
[2017-01-15 16:56:22] accepted: 14/14 (100.00%), 602.37 H/s (yay!!!)
[2017-01-15 16:56:26] GPU #0: result for nonce $000042DD does not validate on CPU!
[2017-01-15 16:56:27] Pool set diff to 6290.01
[2017-01-15 16:56:27] Stratum detected new block
[2017-01-15 16:56:27] GPU #0: result for nonce $00004561 does not validate on CPU!
[2017-01-15 16:56:27] GPU #0: GeForce GTX 1060 6GB, 590.85 H/s
[2017-01-15 16:56:47] GPU #0: result for nonce $00002F60 does not validate on CPU!
[2017-01-15 16:56:50] GPU #0: result for nonce $000034F6 does not validate on CPU!

Any ideas how to fix this problem?

KlausT commented 7 years ago

The same code is working just fine on Windows. Probably some wierd behaviour of the gcc compiler. I think gcc 6.x is not being supported by Nvidia. http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#system-requirements

ddobreff commented 7 years ago

Hi, gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) I'm not using gcc 6.x and the problem persists.

deshi-basara commented 7 years ago

I also can confirm, that the ggc version does not cause the problem on my side. During the cuda installation under Archlinux, symbolic links to ggc5 are created in /opt/cuda/bin/ ... sorry for the confusion, didn't check the ggc-version properly.

KlausT commented 7 years ago

I'm out of ideas then. Is it possible to use gcc 5.3.1 ? I'm not sure if 5.4 works. Since I don't use Linux I can't test it here.

ddobreff commented 7 years ago

The issues is not connected with gcc at all, I will try to debug and see what function is calling cpu validation and how...

KlausT commented 7 years ago

https://github.com/KlausT/ccminer-cryptonight/blob/master/cryptonight/cryptonight.cu#L208 https://github.com/KlausT/ccminer-cryptonight/blob/master/cryptonight.c#L192

But I didn't touch this part of the code at all.

ddobreff commented 7 years ago

Hello, Added -gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_62,code=\"sm_62,compute_62\" to Makefile.am and CPU validation errors disappeared but hashrate went back to 650H/s...

[2017-01-20 11:21:21] Stratum detected new block [2017-01-20 11:21:21] GPU #0: GeForce GTX 1070, 651.98 H/s [2017-01-20 11:21:21] GPU #4: GeForce GTX 1070, 653.52 H/s [2017-01-20 11:21:21] GPU #2: GeForce GTX 1070, 653.98 H/s [2017-01-20 11:21:21] GPU #5: GeForce GTX 1070, 653.20 H/s [2017-01-20 11:21:21] GPU #3: GeForce GTX 1070, 652.62 H/s [2017-01-20 11:21:21] GPU #1: GeForce GTX 1070, 654.30 H/s [2017-01-20 11:21:46] GPU #1: GeForce GTX 1070, 653.22 H/s [2017-01-20 11:21:46] accepted: 12/12 (100.00%), 3918.53 H/s (yay!!!)

ddobreff commented 7 years ago

Here's for linux https://raw.githubusercontent.com/ddobreff/ccminer-cryptonight/46df70dd9bfa24f3929c8ebdc5f2bc6ca5e7509e/Makefile.am

deshi-basara commented 7 years ago

Further information: I compiled the latest version with ggc 5.3 and g++ 5.3 and without the compute_61- and compute_62-option, but the error still occurs.

ddobreff commented 7 years ago

It's not gcc issue, it's architecture problem, compile with compute_61 and the error will be gone but hash speed is decreased to normal...well +1/2%