colonelwatch / nonceMiner

Casual project implementing hash midstate caching to make a very fast miner for revoxhere's duino-coin
GNU General Public License v3.0
40 stars 13 forks source link

OpenCL issue #29

Open Pea13 opened 3 years ago

Pea13 commented 3 years ago

Hello,

I'm trying to mine duno coin on my VIM3 boards but i have a crash when i activate OpenCL:

Initializing nonceMiner v2.2.1...
Configured with username 'pea', identifier '', difficulty 'LOW', and 4 thread(s).
OpenCL flag detected, detecting GPUs...
Building source and kernel for GPU 0 (Vivante OpenCL Device VIPNano-QI.7120.0000)...
(309:0) : warning : #undef a undefined id.
(84:0) : error : the array length must be greater than zero
(91:0) : error : the array length must be greater than zero
(142:0) : error : type mismatch between initializers and defined type
(587:0) : error : syntax error at 'outbuf'
(596:0) : error : syntax error at 'outbuf'
(599:0) : error : syntax error at 'outbuf'
(609:0) : error : syntax error at 'outbuf'
(618:0) : error : syntax error at 'outbuf'
(621:0) : error : syntax error at 'outbuf'

clBuildProgram failed with error code -11
Aborted

Any ideas on how to solve this ? Regards,

colonelwatch commented 3 years ago

No ideas at the moment. For some reason, your version of OpenCL puts out error messages with nothing but line numbers, and those aren't very helpful (the full source is split into multiple files).

colonelwatch commented 3 years ago

Sorry about the long wait, I stitched together all of the source files to figure out what each error meant. Most of them are my mistakes, but most OpenCL compilers didn't mind it. Your compiler did care though.

(84:0) : error : the array length must be greater than zero: In some open-source code I borrowed, some constants that didn't impact the program's use case whatsoever needed to be substituted manually. Specifically, that is <saltBufferSize_bytes> and <ctBufferSize_bytes>. I picked zero (permalink to lines in question), and technically this is not correct C syntax.

(142:0) : error : type mismatch between initializers and defined type: I have no idea why this one is problematic actually (permalink to line in question). You would have to help cover this one by running some attempts at patching it.

(587:0) : error : syntax error at 'outbuf': I accidentally declared a __private unsigned int array with the same name as a typedef'd struct. This is a problem spanned two files, buffer_structs_template.cl and duco_s1.cl, so I guess that's why I didn't catch it.

I would like to fix these errors and test a new patch, but for some reason GPU shares are getting straight-up rejected as of today.

colonelwatch commented 3 years ago

Ah, found the problem. For some reason, the duino-coin devs decided to take the reward policy off of Github, storing it as a .json file on their server instead (https://server.duinocoin.com/PoolRewards.json). Going there I can see that the maximum hashrate for the EXTREME difficulty is 10 MH/s, which is way too low for GPUs.

For now, have you tried compiling and running benchmark? It should fail with the same error, and we can tackle it that way.