[ANN] Opensource primecoin GPU miner beta-testing started! (Crossplatform)

Project repository https://github.com/eXtremal-ik7/xpmminer
Windows binaries: https://www.dropbox.com/s/viuku9h69a0xjjb/xpmminer32.zip
Code based on Primecoin-Hp client and gmp library. Now its suitable only for solo mining. For begin to use it, you must build miner from source (see README).

Platforms supported: Linux, Windows
GPU supported: AMD, NVidia (works on Kepler and Maxwell with low speed now).
Current speed: about 1.2-1.3ch/d on Radeon R9 290X with default parameters (you can experiment with sieve size, weave depth, primorial, etc… see --help)

Repository also contains standalone CPU miner with same performance as Primecoin-Hp (or 5% faster).

Awesome, now I can get some AMD cards to test with.

I received the error messages below while attempting to use an Nvidia card:

./xpmclminer -b --opencl-platform “NVIDIA Corporation”
[0] GeForce GTX 780 Ti; 15 compute units
:3:26: warning: unknown ‘#pragma OPENCL EXTENSION’ - ignored
#pragma OPENCL EXTENSION cl_amd_printf : enable
^
:51:3: warning: implicit declaration of function ‘printf’ is invalid in C99
printf("%08X %08X %08X %08X ", Reg.x, Reg.y, Reg.z, Reg.w);
^
:264:33: error: openCL does not support variable length arrays
uint32_t inverseModulosCurrent[primesPerThread];
^
:2364:9: warning: #pragma pack(pop, …) failed: stack empty
#pragma pack(pop)
^

Error: can’t compile OpenCL kernel /usr/local/share/xpmminer/kernel.cl

Ок, I will try to build miner with NVidia SDK, but I have no GeForce GPUs to full test it.
Try replace line 264:
-uint32_t inverseModulosCurrent[primesPerThread];
+uint32_t inverseModulosCurrent[WeaveDepth / GroupSize];

New error message below:

./xpmclminer -b --opencl-platform “NVIDIA Corporation”
[0] GeForce GTX 780 Ti; 15 compute units
ptxas error : File uses too much global constant data (0x20370 bytes, 0x10000 max)

Error: can’t compile OpenCL kernel /usr/local/share/xpmminer/kernel.cl

Hmm… AMD and Intel OpenCL compilers have not this restriction… wait patch for NVidia … and AMD APP SDK 2.8 (now work with APP SDK 2.9 and Catalyst 14.x only).

Three downclocked (–gpu-engine 790,900,900 --gpu-memclock 1250) Radeon R9 290X output example:

[1] 2.883G, average: 2.721G [2] 3.225G, average: 3.023G [3] 3.184G, average: 3.023G * speed: 9.291G, average: 8.768G * chains/1: 19691591 83789.578/sec * chains/2: 1507835 6415.980/sec * chains/3: 176504 751.041/sec * chains/4: 13885 59.082/sec * chains/5: 1144 4.868/sec * chains/6: 83 0.353/sec * chains/7: 11 0.047/sec 168.502/hour
speed - scanned numbers per second (1G = 1000000000), 1chain/day ~ 3,65G.

please why nothing,when run xpmclminer
wang@wang-Desktop:~/xpmminer/build$ sudo xpmclminer -b
OpenCL platform available: Advanced Micro Devices, Inc.
[0] Pitcairn; 16 compute units
wang@wang-Desktop:~/xpmminer/build$

gdb stack

#0 0x00007fffeda2ad48 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#1 0x00007fffeda2c5db in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#2 0x00007fffeda2e028 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#3 0x00007fffeda2c1ac in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#4 0x00007fffed7de142 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#5 0x00007fffed7dc89c in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#6 0x00007fffed7dcff0 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#7 0x00007fffed7e095a in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#8 0x00007fffedb55374 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#9 0x00007fffedb8c327 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#10 0x00007fffedb8c05e in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#11 0x00007fffedb8bb4b in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#12 0x00007fffedb84dfb in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#13 0x00007fffedb86b05 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#14 0x00007fffedb49cf4 in aclCompile () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#15 0x00007fffed512603 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#16 0x00007fffed51278e in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#17 0x00007fffed521d16 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#18 0x00007fffed520f3a in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#19 0x00007fffed4bb025 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#20 0x00007fffed4cd6d0 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#21 0x00007fffed4b34c7 in clBuildProgram () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#22 0x000000000042d1d3 in OpenCLInit(OpenCLPlatrormContext&, char const*, std::vector<unsigned int, std::allocator >&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, bool, bool) ()
#23 0x000000000042384c in main ()

[quote=“zppwxz, post:6, topic:2223”]please why nothing,when run xpmclminer
wang@wang-Desktop:~/xpmminer/build$ sudo xpmclminer -b
OpenCL platform available: Advanced Micro Devices, Inc.
[0] Pitcairn; 16 compute units
wang@wang-Desktop:~/xpmminer/build$[/quote]
What OS and GPU you use (HD7870)?
How much time benchmark runs?

I think, you use old version of AMD APP SDK. From README:

AMD: APP SDK 2.9 Required

I get the same when I run benchmark, I have catalyst 13.12 and APP SDK 2.9 on ubuntu 12 LTS. The rig has 4x7990 and when i run benchmark I get this

stan@stan-desktop:~$ sudo /usr/local/bin/xpmclminer --benchmark 
OpenCL platform available: Advanced Micro Devices, Inc.
[0] Tahiti; 32 compute units
stan@stan-desktop:~$ 

The benchmark only lasts a few seconds.
Also why did you made such a mess with the hardcoded paths in your code, it’s forcing me to run it as root which does make me uneasy.

[quote=“eXtremal.ik7, post:7, topic:2223”][quote=“zppwxz, post:6, topic:2223”]please why nothing,when run xpmclminer
wang@wang-Desktop:~/xpmminer/build$ sudo xpmclminer -b
OpenCL platform available: Advanced Micro Devices, Inc.
[0] Pitcairn; 16 compute units
wang@wang-Desktop:~/xpmminer/build$[/quote]
What OS and GPU you use (HD7870)?
How much time benchmark runs?

I think, you use old version of AMD APP SDK. From README:

AMD: APP SDK 2.9 Required
[/quote]

[quote=“stanmin, post:8, topic:2223”]I get the same when I run benchmark, I have catalyst 13.12 and APP SDK 2.9 on ubuntu 12 LTS. The rig has 4x7990 and when i run benchmark I get this

stan@stan-desktop:~$ sudo /usr/local/bin/xpmclminer --benchmark 
OpenCL platform available: Advanced Micro Devices, Inc.
[0] Tahiti; 32 compute units
stan@stan-desktop:~$ 

The benchmark only lasts a few seconds.
Also why did you made such a mess with the hardcoded paths in your code, it’s forcing me to run it as root which does make me uneasy.

[quote=“eXtremal.ik7, post:7, topic:2223”][quote=“zppwxz, post:6, topic:2223”]please why nothing,when run xpmclminer
wang@wang-Desktop:~/xpmminer/build$ sudo xpmclminer -b
OpenCL platform available: Advanced Micro Devices, Inc.
[0] Pitcairn; 16 compute units
wang@wang-Desktop:~/xpmminer/build$[/quote]
What OS and GPU you use (HD7870)?
How much time benchmark runs?

I think, you use old version of AMD APP SDK. From README:

AMD: APP SDK 2.9 Required
[/quote][/quote]

OS: Ubuntu 13.10 x64
AMD-APP-SDK-v2.9-lnx64.tgz
Linux_AMD_Catalyst_14.3_Beta_V1.0_B22_March12_2014.zip
GPU HD7850 for test
update, but There are still error.

/xpmclminer -o 192.168.1.137:9914 -u userName -p password -w AR9dmNAWL1Siymqenf5LnnDyfDboRAW9jX

#13 0x00007fffedb86b05 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#14 0x00007fffedb49cf4 in aclCompile () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#15 0x00007fffed512603 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#16 0x00007fffed51278e in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#17 0x00007fffed521d16 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#18 0x00007fffed520f3a in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#19 0x00007fffed4bb025 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#20 0x00007fffed4cd6d0 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#21 0x00007fffed4b34c7 in clBuildProgram () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
#22 0x000000000042d1d3 in OpenCLInit(OpenCLPlatrormContext&, char const*, std::vector<unsigned int, std::allocator >&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, bool, bool) ()
#23 0x000000000042384c in main ()

I get the same when I run benchmark, I have catalyst 13.12 and APP SDK 2.9 on ubuntu 12 LTS.
#13 0x00007fffedb86b05 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
Problem in file libamdocl64.so, it contains OpenCL compiler; old version of this file have a bug, compiler crashes on code contains C unions. Both AMD packages - APP SDK and Catalyst drivers contains this file, and after you tests we can conclude that APP SDK contains broken OpenCL compiler. You can reinstall driver or manually replace libamdocl64.so file to version from Catalyst package. On ubuntu you can use dpkg command:
dpkg -x fglrx_13.350-0ubuntu1_amd64.deb /tmp

And then copy /tmp/usr/lib/fglrx/libamdocl64.so to APP SDK directory (for me - /opt/AMDAPP/lib/x86_64)

#22 0x000000000042d1d3 in OpenCLInit(OpenCLPlatrormContext&, char const*, std::vector<unsigned int, std::allocator >&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, bool, bool) ()
You build debug version, if you not want debugging, add -DCMAKE_BUILD_TYPE=Release to cmake arguments :)
Also why did you made such a mess with the hardcoded paths in your code, it's forcing me to run it as root which does make me uneasy.
It will be fixed in next updates (generate before constants.h is not good idea, NVidia SDK can't compile big constant arrays).

Do I need to recompile the miner after I replace libamdocl64.so or that file kicks in at runtime when the cl kernel is compiled?

[quote=“eXtremal.ik7, post:10, topic:2223”]

I get the same when I run benchmark, I have catalyst 13.12 and APP SDK 2.9 on ubuntu 12 LTS.

#13 0x00007fffedb86b05 in ?? () from /opt/AMDAPP/lib/x86_64/libamdocl64.so
Problem in file libamdocl64.so, it contains OpenCL compiler; old version of this file have a bug, compiler crashes on code contains C unions. Both AMD packages - APP SDK and Catalyst drivers contains this file, and after you tests we can conclude that APP SDK contains broken OpenCL compiler. You can reinstall driver or manually replace libamdocl64.so file to version from Catalyst package. On ubuntu you can use dpkg command:
dpkg -x fglrx_13.350-0ubuntu1_amd64.deb /tmp

And then copy /tmp/usr/lib/fglrx/libamdocl64.so to APP SDK directory (for me - /opt/AMDAPP/lib/x86_64)

#22 0x000000000042d1d3 in OpenCLInit(OpenCLPlatrormContext&, char const*, std::vector<unsigned int, std::allocator >&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, bool, bool) ()
You build debug version, if you not want debugging, add -DCMAKE_BUILD_TYPE=Release to cmake arguments :)
Also why did you made such a mess with the hardcoded paths in your code, it's forcing me to run it as root which does make me uneasy.
It will be fixed in next updates (generate before constants.h is not good idea, NVidia SDK can't compile big constant arrays).[/quote]

Recompiling not needed, file replacing is enough.

Managed to get it working thanks to your instructions above, here’s how things look after few minutes running;

[1] 1.864G, average: 1.777G
[2] 2.125G, average: 2.067G
[3] 2.100G, average: 2.025G
[4] 2.133G, average: 2.067G
[5] 1.909G, average: 1.860G
[6] 1.927G, average: 1.819G
[7] 0.594G, average: 0.744G
[8] 0.594G, average: 0.744G
 * speed: 13.245G, average: 13.103G
   * chains/1: 30541312 122155.397/sec 
   * chains/2: 2298516 9193.323/sec 
   * chains/3: 261689 1046.672/sec 
   * chains/4: 20212 80.841/sec 
   * chains/5: 1561 6.243/sec 
   * chains/6: 118 0.472/sec 
   * chains/7: 13 0.052/sec 187.185/hour 

All default values, any input on sleeve size and other parameters would be much appreciated.
Thank you very much for open sourcing this, I’ll donate my first found block.

Recompiling not needed, file replacing is enough.[/quote]

[quote=“stanmin, post:13, topic:2223”]All default values, any input on sleeve size and other parameters would be much appreciated.
Thank you very much for open sourcing this, I’ll donate my first found block.[/quote]
Thanks for beta-testing joining. Miner now slower than others… but not for a long time :slight_smile:

What catalyst version you use now? I know about problem with catalyst 13.x - after 10 minutes work miner looses 50% of its performance… until next reboot. With 14.3 miner works stable. I see that 2 your GPU show too low speed - 0,594G… may be this is same problem… or these GPUs are downclocked ?
On stock Radeon R9 290X I got 3.6G (with default primorial 19).

I use the 13.12 catalyst and would rather stay with it so I wont have issues with some other miners. The two last GPUs might be acting up due to bad riser I always get bit less hashrate not very significant on them but nothing this drastic, they all run on the same clock speed, identical GPUs 4x7990 aka 8x7970 The 5 and 6 GPUs also run at a lower speed than the first 4 but I never had troubles with those, so I’m not sure it might be a catalyst thing or the miner has issues allocating work load on all GPUs
It also appears that there is little to no CPU usage and the GPUs run pretty cool.
Also it would be great if we could bind on specific GPUs rather than all available, so we can test scaling issues like mine.

[quote=“eXtremal.ik7, post:14, topic:2223”][quote=“stanmin, post:13, topic:2223”]All default values, any input on sleeve size and other parameters would be much appreciated.
Thank you very much for open sourcing this, I’ll donate my first found block.[/quote]
Thanks for beta-testing joining. Miner now slower than others… but not for a long time :slight_smile:

What catalyst version you use now? I know about problem with catalyst 13.x - after 10 minutes work miner looses 50% of its performance… until next reboot. With 14.3 miner works stable. I see that 2 your GPU show too low speed - 0,594G… may be this is same problem… or these GPUs are downclocked ?
On stock Radeon R9 290X I got 3.6G (with default primorial 19).[/quote]

Will test on c2075 if there is a windows binary.

Yes, I want implement all cgminer GPU control features (separately disabling, temperature monitoring), etc…

Kubuntu 13.10, 3xRadeon R9 290X, Catalyst 14.3:

Gentoo (with kernel 3.8 ), 1xRadeon R9 290X overclocked, Catalyst 14.3:

Same GPUs, but very different permormance, I will try to fix this issue…

Will test on c2075 if there is a windows binary.
Windows support will come next week, but I have not NVidia GPU's for testing.. miner can work too slow.

Thanks, i’m already run. ok.

GPU HD 7850, only 0.848G,
how to Overclocking ?

** xpmclminer started 17-04-2014 14:22:24 192.168.1.137:9914 AR9dmNAWL1Siymqenf
** block: 496784, difficulty: 10.759

[1] 0.848G, average: 0.847G63716295258677314151423011049444315180870499005430498

  • speed: 0.848G, average: 0.847G
    43049856206994009908374550605349826421197442059557748820683481592967418248845419
    • chains/1: 4864228 7895.962/sec
    • chains/2: 370215 600.959/sec
    • chains/3: 42731 69.364/sec
    • chains/4: 3325 5.397/sec
    • chains/5: 285 0.463/sec
    • chains/6: 19 0.031/sec

17-04-2014 14:22:24: new block detected: 496769
17-04-2014 14:22:32: new block detected: 496770
17-04-2014 14:22:48: new block detected: 496771
17-04-2014 14:23:24: new block detected: 496772
17-04-2014 14:23:28: new block detected: 496773
17-04-2014 14:23:40: new block detected: 496774
17-04-2014 14:24:48: new block detected: 496775
17-04-2014 14:25:32: new block detected: 496776

[quote=“zppwxz, post:18, topic:2223”]GPU HD 7850, only 0.848G,
how to Overclocking ?[/quote]
7850 3 times slower than R9 290X and has only 256bit memory bus. For overclocking use aticonfig:

aticonfig --help

6. AMD Overdrive (TM). List adapters : aticonfig --list-adapters Get Clocks of 0 : aticonfig --adapter=0 --od-getclocks Set new Clocks for 0 : aticonfig --adapter=0 --od-setclocks=770,1126 Test out 3D : atiode -P60 -H localhost:0; echo $? Check Temperature of 0 : aticonfig --adapter=0 --od-gettemperature Commit changes for 0 : aticonfig --adapter=0 --od-commitclocks

how to mining ypool , use xpmminer .
Is it right? Now also does not support?