Author Topic: Open source optimized PTS CPU miner (BETA)  (Read 17997 times)

0 Members and 1 Guest are viewing this topic.

Offline aliasme

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #60 on: January 18, 2014, 01:52:24 am »
[email protected]:/home/proto/ptsminer/src# make -f makefile.unix.no-chrono

g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread
obj/sha512.o: In function `Init_SHA512_avx2':
sha512.c:(.text+0x27): undefined reference to `sha512_transform_rorx'
sha512.c:(.text+0x32): undefined reference to `sha512_transform_single_rorx'
collect2: ld returned 1 exit status
make: *** [ptsminer] Error 1

What do I need to do? Thanks in advance

Ah - I haven't updated the no-chrono makefile

You can run by hand:

gcc intel/sha512_avx2.S -O3 -o obj/sha512_avx2.o

g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_avx2.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread

Or try grabbing one of the newer, faster binary builds.

I'll patch up that makefile pretty soon.  Thanks for letting me know - I wasn't sure if anyone wanted to use it.

  -Dave

Thanks much. I nuked my post after finding the makefile and assuming I needed to comment out the avx2 code.

Going to try again --- here's the CPU output, which binary?

processor   : 7
vendor_id   : GenuineIntel
cpu family   : 6
model      : 44
model name   : Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz
stepping   : 2
cpu MHz      : 2400.260
cache size   : 4096 KB
fpu      : yes
fpu_exception   : yes
cpuid level   : 11
wp      : yes
flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl pni ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm
bogomips   : 4800.52
clflush size   : 64
cache_alignment   : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:


Thanks for your help. Understanding the CPU features and seeing this performance improvement is cool. Great stuff you are doing.

Offline aliasme

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #61 on: January 18, 2014, 01:54:06 am »
Output when compiling by hand:

[email protected]:/home/proto/ptsminer/src# g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_avx2.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread
g++: obj/sha512_avx2.o: No such file or directory

Offline plane501

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #62 on: January 18, 2014, 01:55:16 am »
Windows version please :)

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #63 on: January 18, 2014, 01:59:54 am »
model name   : Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz

http://ark.intel.com/products/48768/Intel-Xeon-Processor-E5645-12M-Cache-2_40-ghz-5_86-gts-Intel-qpi

The SSE one.  LMK if it works - I haven't tested on that model.

  -Dave

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #64 on: January 18, 2014, 02:00:29 am »
Output when compiling by hand:

[email protected]:/home/proto/ptsminer/src# g++ -Wl,-z,relro -Wl,-z,now  -o ptsminer  obj/cpuid.o obj/sha512_avx.o obj/sha512_avx2.o obj/sha512_sse4.o obj/sha512.o obj/sph_sha2.o obj/sph_sha2big.o obj/main_poolminer.o  -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -Wl,-Bdynamic -l z -l dl -l pthread
g++: obj/sha512_avx2.o: No such file or directory

First run:

gcc -O3 intel/sha512_avx2.S -o obj/sha512_avx2.o

Offline ptsrush

  • Full Member
  • ***
  • Posts: 84
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #65 on: January 18, 2014, 02:12:29 am »
Hi dga,

ptsminer-dga-beta5-avx2-linux64-static rush at about 530 - 535 cpm on my e3-1230 v3 haswell gentoo box.

Really crazy.

I'm not native speaker, but maybe in such case guess I should say it's "damn fast"!

Anyway, once a new block start, seems all my 6 worker print "Aborting scan run because of new work."

It's is a little annoying. Could you output them only 1 time?

And sometime it says "Not inserted: <298324783427234980742398> at 7744". Is it OK?

The RJ is about 5% in China. I'm not sure is due to broken internet or something else.

Offline aliasme

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #66 on: January 18, 2014, 02:15:27 am »
[STATS] 2014-Jan-18 02:46:35 | 255.8 c/m | 2.2 sh/m | VL: 12 (100.0%), RJ: 0 (0.0%), ST: 0 (0.0%)

This is at least 2x.

Wow, nice work.
« Last Edit: January 18, 2014, 02:47:58 am by alaisme »

Offline allano

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #67 on: January 18, 2014, 06:40:15 am »
Hi dga,

ptsminer-dga-beta5-avx2-linux64-static.bin rush at about 580 - 610 cpm on my i7-4770 CPU @ 3.40GHz Ubuntu.

I wish to compile it to my AMD Opteron can you make the source code to githube, please?

Very nice work from you ;)

Offline noobster

  • Jr. Member
  • **
  • Posts: 35
  • cryptocurrencies vs. fed
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #68 on: January 18, 2014, 09:52:02 am »
with the pool fee the 3% miner fee is preety high together

also it would be nice if one can specify the amount of ram per thread

thanks
BTC: 15mey7vTkkvHm4UoZgVEP4Yo3REDpH87KW
PTS: PkzbnN7Nkv6TcqJuNjpcLfmPqpPUphpu5W
drop some =)

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #69 on: January 18, 2014, 10:13:36 am »
Replying to a bunch of the previous comments:

- I'll disable the "aborting scan" message in the next set of changes.  I still want to put in a slightly better method for doing this, because I think it is increasing the reject rate a little bit.  @ptsrush, my guess is it's a little bit because of latency and a little bit because the miner works in bigger chunks.  I'll make it a priority to get that in the next build.

@allano, re source code to github: 
  (a)  Which opteron do you have?  I'm running the SSE one on AMD CPUs with SSE support.  It works just fine.
  (b)  I have a few reasons I'm not pushing the source yet:  First, the build is a mess, and I need to move it to using autoconf or some other method.  There are currently four different makefiles that the project inherited from ptsminer, and part of my recent optimization adds different code that runs on different CPUs.  The combination of this is currently unmanageable.

  Second, I'm trying to figure out what the right strategy is for this one to fund development.  It's pretty clear based on what happened with the GPU miners that if I release all of my tricks without supporting more pools and windows, a whole lot of clones will spring up with binary builds for other platforms with high dev fees that go to someone else.  I'm fine with that in the long term, but I want to be careful.  I've put .. um .. rather a lot of work into the current optimized CPU version.

  My current thought is that I'm going to wait until *I* can provide easy-to-use binaries for both linux and windows with a 1-2% dev fee that supports both beeeeer and ypool, and then release the source as well.  Of course, I'd also be happy to go with a sponsored code release again or explore other options, but the dev fee really does seem like a very equitable way.

@noobster: Agreed.  The 3% dev fee is temporary.  I'm going to cut it down to 2% pretty soon.
  - Do you mind the 60 second dev mine starting time?  I'd rather increase the user time from 2000 to 3000 seconds than reduce dev mine from 60 to 40 --- it's more efficient to run for longer.

- Amount of RAM per thread:  The algorithms I'm using in this are completely different from what previous miners did.  There's no way to use less RAM because of the way I store the data, and using more RAM will actually make it slower.

Did you want to use *less* RAM, or more because you want it go to faster?

  -Dave

Offline noobster

  • Jr. Member
  • **
  • Posts: 35
  • cryptocurrencies vs. fed
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #70 on: January 18, 2014, 11:31:34 am »
I wanted more ram options so I can experiment a bit with different settings. Say from 512 to 2048 MB per thread adjustable by 256MB… no idea this could take a lot of work maybe.

And you were right about the rejects, beta4 update increased the reject rate to over 30% in my case lol
BTC: 15mey7vTkkvHm4UoZgVEP4Yo3REDpH87KW
PTS: PkzbnN7Nkv6TcqJuNjpcLfmPqpPUphpu5W
drop some =)

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #71 on: January 18, 2014, 01:12:12 pm »
I wanted more ram options so I can experiment a bit with different settings. Say from 512 to 2048 MB per thread adjustable by 256MB… no idea this could take a lot of work maybe.

And you were right about the rejects, beta4 update increased the reject rate to over 30% in my case lol

Gotcha.  The thing to tune isn't RAM - as I said, the goal is actually to solve the problem with as *little* RAM per thread as possible, because it's faster if you can do that.  Google a bit about the TLB and L2 DTLB if you're curious to understand the background behind this.  Some of the big changes between the beta2 and beta5 releases were related to using less memory in order to make things faster.

The thing to play around with tuning is the number of threads.  If you're not also doing GPU mining, you want to use at least as many threads as your CPU has real cores.  But you might also want to use more - but the optimal number is tricky.  On a 4 core CPU, the right answer might be anywhere from 4-7.

Offline mmao

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #72 on: January 18, 2014, 01:48:28 pm »
I got some error messages when I compile the source:
Code: [Select]
cc -c -O3 intel/sha512_avx2.S -o obj/sha512_avx2.o
intel/sha512_avx2.S: Assembler messages:
intel/sha512_avx2.S:606: Error: suffix or operands invalid for `vpshufb'
intel/sha512_avx2.S:607: Error: suffix or operands invalid for `vpshufb'
intel/sha512_avx2.S:608: Error: suffix or operands invalid for `vpshufb'
intel/sha512_avx2.S:609: Error: suffix or operands invalid for `vpshufb'
intel/sha512_avx2.S:618: Error: suffix or operands invalid for `vpaddq'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpalignr'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpaddq'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpalignr'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpsrlq'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpsllq'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpor'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpsrlq'
intel/sha512_avx2.S:620: Error: no such instruction: `rorx $41,e,y0'
intel/sha512_avx2.S:620: Error: no such instruction: `rorx $18,e,y1'
intel/sha512_avx2.S:620: Error: no such instruction: `rorx $34,a,T1'
why ?

Offline dga

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #73 on: January 18, 2014, 02:00:28 pm »
I got some error messages when I compile the source:
Code: [Select]
cc -c -O3 intel/sha512_avx2.S -o obj/sha512_avx2.o
intel/sha512_avx2.S: Assembler messages:
intel/sha512_avx2.S:606: Error: suffix or operands invalid for `vpshufb'
intel/sha512_avx2.S:607: Error: suffix or operands invalid for `vpshufb'
intel/sha512_avx2.S:608: Error: suffix or operands invalid for `vpshufb'
intel/sha512_avx2.S:609: Error: suffix or operands invalid for `vpshufb'
intel/sha512_avx2.S:618: Error: suffix or operands invalid for `vpaddq'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpalignr'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpaddq'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpalignr'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpsrlq'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpsllq'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpor'
intel/sha512_avx2.S:620: Error: suffix or operands invalid for `vpsrlq'
intel/sha512_avx2.S:620: Error: no such instruction: `rorx $41,e,y0'
intel/sha512_avx2.S:620: Error: no such instruction: `rorx $18,e,y1'
intel/sha512_avx2.S:620: Error: no such instruction: `rorx $34,a,T1'
why ?

What compiler?  It's possible you're using too old a version of gcc that doesn't understand the avx2 instructions.

Offline mmao

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: Open source optimized PTS CPU miner (BETA)
« Reply #74 on: January 18, 2014, 02:03:51 pm »
it's a centos6 box
Code: [Select]
%gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)