We really need to find someone able to rewrite the miner.
According to j0nn9, there's just one candidate,
"madmax" aka
eXtremal-ik7 - (I’m not entirely sure j0nn9's conflation of two identities is correct but whatever...) the latter identity is still working in the area of primes-as-PoW, active in pursuing
a Primecoin 0.16 wallet (Sunny King has pretty much abandoned Primecoin development) and operating the
http://coinsforall.io prime-mining pool.
Some history ...
i’ve managed to build a experimental gpu miner... The miner is a hybrid version of eXtremal’s fermat test and GapMiner’s sieve.
In the event, j0nn9 created an OpenCL version which he couldn't test on nVidia because he didn't have an nVidia card. It transpired that the OpenCL code wouldn't successfully execute on nVidia cards:
[2014-11-07 07:05:28] Server supports longpoll
[2014-11-07 07:05:28] Got new target: 13.0000000 @ 22.4320864
[2014-11-07 07:05:33] Found platform[0] name = NVIDIA CUDA
[2014-11-07 07:05:33] Found 3 device(s)
[2014-11-07 07:05:33] Compiling ...
[2014-11-07 07:05:33] Source: 205100 bytes
[2014-11-07 07:05:36] pps: -2147483648 / -2147483648 10g/h -2147483648 / -2147483648 15g/h -2147483648 / -2147483648
[2014-11-07 07:05:42] Compiled kernel binary size = 969615 bytes
[2014-11-07 07:05:42] Loaded kernel binary size = 969615 bytes
[2014-11-07 07:05:42] Using GPU 0 [GeForce GTX 750 Ti]: which has 5 CUs
[2014-11-07 07:05:42] clWaitForEvents error -9999!
[2014-11-07 07:05:42] OpenCL error: -5 at ./src/GPUFermat.cpp:406
[2014-11-07 07:05:42] OpenCL error: -5 at ./src/GPUFermat.cpp:397
[2014-11-07 07:05:42] OpenCL error: -5 at ./src/GPUFermat.cpp:397
And it still won't. I recently compiled the GapMiner code (adding some print statements) and checked its execution on my old XPS with GeForce GTX 1050 and CUDA 11.0 only to see the exact same error messages:
[2021-03-06 10:08:40] Found platform[0] name = NVIDIA CUDA
[2021-03-06 10:08:40] Found 1 device(s)
[2021-03-06 10:08:40] Loaded kernel binary size = 973509 bytes
[2021-03-06 10:08:40] Using GPU 0 [GeForce GTX 1050]: which has 5 CUs
[2021-03-06 10:08:40] Got new target: 22.2657854 @ 22.2657854
running 16384 fermat tests on the gpu
[2021-03-06 10:08:40] clWaitForEvents error -9999!
[2021-03-06 10:08:40] OpenCL error: -5 at ./src/GPUFermat.cpp:440
running 16384 fermat tests on the gpu
[2021-03-06 10:08:40] OpenCL error: -5 at ./src/GPUFermat.cpp:431
[2021-03-06 10:08:40] OpenCL error: -5 at ./src/GPUFermat.cpp:431
[2021-03-06 10:08:40] OpenCL error: -5 at ./src/GPUFermat.cpp:431
[2021-03-06 10:08:40] clWaitForEvents error -9999!
[2021-03-06 10:08:40] OpenCL error: -5 at ./src/GPUFermat.cpp:440
However, I can't proceed any further atm, there seems to be an unrelated general nVidia issue with my new XPS with GeForce GTX 1060 and CUDA 11.2:
[2021-03-06 10:08:04] OpenCL error: -1001 at ./src/GPUFermat.cpp:135
[2021-03-06 10:08:04] OpenCL error: -34 at ./src/GPUFermat.cpp:425
[2021-03-06 10:08:04] OpenCL error: -34 at ./src/GPUFermat.cpp:425
[2021-03-06 10:08:04] OpenCL error: -34 at ./src/GPUFermat.cpp:425
[2021-03-06 10:08:04] Got new target: 22.2657854 @ 22.2657854
running 16384 fermat tests on the gpu
[2021-03-06 10:08:04] OpenCL error: -36 at ./src/GPUFermat.cpp:431
[2021-03-06 10:08:04] OpenCL error: -36 at ./src/GPUFermat.cpp:431
[2021-03-06 10:08:04] OpenCL error: -36 at ./src/GPUFermat.cpp:431
./runminergpu: line 18: 456200 Segmentation fault (core dumped)
Anyway, here's something to consider ...
eXtremal-ik7 is also the source of the current XPM miner - and Datacoin shares that PoW code, so the XPM miner works with Datacoin.
On the offchance, I downloaded
the linux binary xpmclient-cuda-10.5-beta2-linux for eXtremal-ik7's
xpmclient from the coinsforall.io pool, pointed it at Datacoin and
it worked! (on my old XPS, that is - it blows up on the new XPS, indicative of a machine issue rather than an issue with the code).
So, we know that a CUDA-based implementation of prime mining works even if the OpenCL doesn't. j0nn9 created an OpenCL version of three GPU-specific source code files,
benchmarks.cl,
fermat.cl and
procs.cl. What we'd want (to avoid nVidia's apparently broken support for OpenCL) is three CUDA files to replace the OpenCL ones - like those available in
eXtremal-ik7's xpmclient repos:
benchmarks.cu,
fermat.cu and
procs.cu. At first glance, it looks like that might be a good route forward.
But that's just a starting point. The GapMiner implementation is
ancient and relies upon a long-removed RPC API call
getwork (which I had to reimplement for the Gapcoin 0.16.3 client) replaced entirely by the
getblocktemplate RPC API call. The difference is that with
getwork, it is the client which creates the blocks to be mined, with
getblocktemplate, the task of creating the blocks now rests with the miner, the client merely transmits the acceptable parameters. This change was part of the move to versionbits (soft-forks) which allows miners to signal their change preferences using the versionbits bit-signalling - not something that's possible when the client just dumps a monolithic block to be fed to the PoW calculation.
So it's
long past the due date for a re-write of the GapMiner interface with the client. eXtremal-ik7's xpmminer is a good starting point for an adaptation to Gapcoin, it contains the block-assembly code that's needed to create blocks from the data returned by a
getblocktemplate call and is a complete standalone miner implementation.
Take a look at the
build.sh script (note that although not specified,
the CLRX code is available from Github)
If I didn't have this CUDA/OpenCL issue on my current XPS, it's where
I'd be starting if I were interested in creating a new CPU/GPU-capable GapMiner.
If one day there is no longer a functional miner, there will be no more problem with the wallet.
Nor anything else.
And there you have neatly encapsulated my objective in restoring the in-wallet miner, as long as that remains operational, the chain can continue.
Cheers
Graham
I tried runing the gpu miner on my laptop with nvidia.I used windows 10. The cl error I got are different than yours. By reading the code I have found the source of my errors.and they don't looks like it comes from the cl implementation but rather from the difference between the hardware of the vendors. It seams the host is writing to much data to the device.
The problem now is that my laptop is broken and I need to get a graphic card to my stationary computer. So I can not go further with it at the moment.
Different nvidia chips could cause different problems as it looks. I'm not good with it, but I will try to get my hands on some old cards to play with.
Graham I checked your errors to and they seam to be similare. Your new computer with GeForce GTX 1060 is not recogniced by the program because it was written long before that card was released. Also the code he used is for a opencl version that did not take care off different hardware very well.