Author

Topic: [ANN]: cpuminer-opt v3.8.8.1, open source optimized multi-algo CPU miner - page 183. (Read 444067 times)

legendary
Activity: 2716
Merit: 1094
Black Belt Developer
sorry sir:

./algo/groestl/sse2/groestl.c:37:25: fatal error: sph_groestl.h: No such file or directory

[.....]

algo/qubit/qubit.c: In function ‘qubithash’:
algo/qubit/qubit.c:89:23: error: ‘ctx_echo’ undeclared (first use in this function)
         sph_echo512 (&ctx_echo, (const void*) hash, 64);

Are you sure you did "make clean" before compiling it?

Are you compiling for SSE2? That doesn't work.

uh... yes... sorry :-/
legendary
Activity: 1470
Merit: 1114
sorry sir:

./algo/groestl/sse2/groestl.c:37:25: fatal error: sph_groestl.h: No such file or directory

[.....]

algo/qubit/qubit.c: In function ‘qubithash’:
algo/qubit/qubit.c:89:23: error: ‘ctx_echo’ undeclared (first use in this function)
         sph_echo512 (&ctx_echo, (const void*) hash, 64);

Are you sure you did "make clean" before compiling it?

Are you compiling for SSE2? That doesn't work.
legendary
Activity: 2716
Merit: 1094
Black Belt Developer
sorry sir:

./algo/groestl/sse2/groestl.c:37:25: fatal error: sph_groestl.h: No such file or directory

[.....]

algo/qubit/qubit.c: In function ‘qubithash’:
algo/qubit/qubit.c:89:23: error: ‘ctx_echo’ undeclared (first use in this function)
         sph_echo512 (&ctx_echo, (const void*) hash, 64);

Are you sure you did "make clean" before compiling it?
legendary
Activity: 1470
Merit: 1114
Oh yeah, add #include "algo-gate-api.h" also.

algo/lyra2/lyra2.c: In function ‘register_lyra2’:
algo/lyra2/lyra2.c:227:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->scahhash   = &LYRA2;
       ^
algo/lyra2/lyra2.c:228:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->init_ctx   = &initState;
       ^
algo/lyra2/lyra2.c:229:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->set_target = &lyra2_set_target;


This is deja vu. I've seen each of those errors before. The starting point had no algo-gate code
in lyra2.c No gate functions, no registration function and no includes changes. That os what I
intended to deliver.

My apologies for messing up so bad. I'll get a new build out soon.

Beta2:

https://drive.google.com/file/d/0B0lVSGQYLJIZbElvRWdJWFBKV2s/view?usp=sharing
legendary
Activity: 1470
Merit: 1114
Oh yeah, add #include "algo-gate-api.h" also.

algo/lyra2/lyra2.c: In function ‘register_lyra2’:
algo/lyra2/lyra2.c:227:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->scahhash   = &LYRA2;
       ^
algo/lyra2/lyra2.c:228:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->init_ctx   = &initState;
       ^
algo/lyra2/lyra2.c:229:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->set_target = &lyra2_set_target;


This is deja vu. I've seen each of those errors before. The starting point had no algo-gate code
in lyra2.c No gate functions, no registration function and no includes changes. That os what I
intended to deliver.

My apologies for messing up so bad. I'll get a new build out soon.
legendary
Activity: 2716
Merit: 1094
Black Belt Developer
Oh yeah, add #include "algo-gate-api.h" also.

algo/lyra2/lyra2.c: In function ‘register_lyra2’:
algo/lyra2/lyra2.c:227:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->scahhash   = &LYRA2;
       ^
algo/lyra2/lyra2.c:228:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->init_ctx   = &initState;
       ^
algo/lyra2/lyra2.c:229:7: error: invalid type argument of ‘->’ (have ‘algo_gate_t {aka struct }’)
   gate->set_target = &lyra2_set_target;
legendary
Activity: 1470
Merit: 1114
latest dev beta has some issues on lyra2:

algo/lyra2/lyra2.c:217:46: warning: ‘struct work’ declared inside parameter list
                                              double factor )
                                              ^
algo/lyra2/lyra2.c:217:46: warning: its scope is only this definition or declaration, which is probably not what you want
algo/lyra2/lyra2.c: In function ‘lyra2_set_target’:
algo/lyra2/lyra2.c:219:2: warning: implicit declaration of function ‘work_set_target’ [-Wimplicit-function-declaration]
  work_set_target( work, job_diff / (65536.0 * factor) );
  ^
algo/lyra2/lyra2.c: At top level:
algo/lyra2/lyra2.c:223:1: error: unknown type name ‘bool’
 bool register_lyra2( algo_gate_t gate )
 ^
algo/lyra2/lyra2.c:223:22: error: unknown type name ‘algo_gate_t’
 bool register_lyra2( algo_gate_t gate )



HMMM, I thought I fixed that already, need to add #include to lyra2.c.
Those last minute changes are a killer. Good thing it's only beta.

Note that lyra2 in the code is not the same as -a lyra2 on the command line and
is not on the supported algo list. But a compile error, that's bad.

thanks, but not enough:

algo/lyra2/lyra2.c:218:46: warning: ‘struct work’ declared inside parameter list
                                              double factor )
                                              ^
algo/lyra2/lyra2.c:218:46: warning: its scope is only this definition or declaration, which is probably not what you want
algo/lyra2/lyra2.c: In function ‘lyra2_set_target’:
algo/lyra2/lyra2.c:220:2: warning: implicit declaration of function ‘work_set_target’ [-Wimplicit-function-declaration]
  work_set_target( work, job_diff / (65536.0 * factor) );
  ^
algo/lyra2/lyra2.c: At top level:
algo/lyra2/lyra2.c:224:22: error: unknown type name ‘algo_gate_t’
 bool register_lyra2( algo_gate_t gate )

Oh yeah, add #include "algo-gate-api.h" also.
legendary
Activity: 2716
Merit: 1094
Black Belt Developer
latest dev beta has some issues on lyra2:

algo/lyra2/lyra2.c:217:46: warning: ‘struct work’ declared inside parameter list
                                              double factor )
                                              ^
algo/lyra2/lyra2.c:217:46: warning: its scope is only this definition or declaration, which is probably not what you want
algo/lyra2/lyra2.c: In function ‘lyra2_set_target’:
algo/lyra2/lyra2.c:219:2: warning: implicit declaration of function ‘work_set_target’ [-Wimplicit-function-declaration]
  work_set_target( work, job_diff / (65536.0 * factor) );
  ^
algo/lyra2/lyra2.c: At top level:
algo/lyra2/lyra2.c:223:1: error: unknown type name ‘bool’
 bool register_lyra2( algo_gate_t gate )
 ^
algo/lyra2/lyra2.c:223:22: error: unknown type name ‘algo_gate_t’
 bool register_lyra2( algo_gate_t gate )


HMMM, I thought I fixed that already, need to add #include to lyra2.c.
Those last minute changes are a killer. Good thing it's only beta.

Note that lyra2 in the code is not the same as -a lyra2 on the command line and
is not on the supported algo list. But a compile error, that's bad.

thanks, but not enough:

algo/lyra2/lyra2.c:218:46: warning: ‘struct work’ declared inside parameter list
                                              double factor )
                                              ^
algo/lyra2/lyra2.c:218:46: warning: its scope is only this definition or declaration, which is probably not what you want
algo/lyra2/lyra2.c: In function ‘lyra2_set_target’:
algo/lyra2/lyra2.c:220:2: warning: implicit declaration of function ‘work_set_target’ [-Wimplicit-function-declaration]
  work_set_target( work, job_diff / (65536.0 * factor) );
  ^
algo/lyra2/lyra2.c: At top level:
algo/lyra2/lyra2.c:224:22: error: unknown type name ‘algo_gate_t’
 bool register_lyra2( algo_gate_t gate )
legendary
Activity: 1470
Merit: 1114
latest dev beta has some issues on lyra2:

algo/lyra2/lyra2.c:217:46: warning: ‘struct work’ declared inside parameter list
                                              double factor )
                                              ^
algo/lyra2/lyra2.c:217:46: warning: its scope is only this definition or declaration, which is probably not what you want
algo/lyra2/lyra2.c: In function ‘lyra2_set_target’:
algo/lyra2/lyra2.c:219:2: warning: implicit declaration of function ‘work_set_target’ [-Wimplicit-function-declaration]
  work_set_target( work, job_diff / (65536.0 * factor) );
  ^
algo/lyra2/lyra2.c: At top level:
algo/lyra2/lyra2.c:223:1: error: unknown type name ‘bool’
 bool register_lyra2( algo_gate_t gate )
 ^
algo/lyra2/lyra2.c:223:22: error: unknown type name ‘algo_gate_t’
 bool register_lyra2( algo_gate_t gate )


HMMM, I thought I fixed that already, need to add #include to lyra2.c.
Those last minute changes are a killer. Good thing it's only beta.

Note that lyra2 in the code is not the same as -a lyra2 on the command line and
is not on the supported algo list. But a compile error, that's bad.

Edit: ultimately what I intended was to backout the last minute changes but chose
the wrong snapshot. You can comment out  the body of register_lyra2_algo.
legendary
Activity: 2716
Merit: 1094
Black Belt Developer
latest dev beta has some issues on lyra2:

algo/lyra2/lyra2.c:217:46: warning: ‘struct work’ declared inside parameter list
                                              double factor )
                                              ^
algo/lyra2/lyra2.c:217:46: warning: its scope is only this definition or declaration, which is probably not what you want
algo/lyra2/lyra2.c: In function ‘lyra2_set_target’:
algo/lyra2/lyra2.c:219:2: warning: implicit declaration of function ‘work_set_target’ [-Wimplicit-function-declaration]
  work_set_target( work, job_diff / (65536.0 * factor) );
  ^
algo/lyra2/lyra2.c: At top level:
algo/lyra2/lyra2.c:223:1: error: unknown type name ‘bool’
 bool register_lyra2( algo_gate_t gate )
 ^
algo/lyra2/lyra2.c:223:22: error: unknown type name ‘algo_gate_t’
 bool register_lyra2( algo_gate_t gate )
legendary
Activity: 1470
Merit: 1114
Preliminary testing of quark using the algo_gate has increased performance 4%,
completely unexpected. I dodn't see any imnherent opportunities for increases
unless the smaller code base caches better.

Further testing is showing a 4 to 5% increase in all algos on my 4790k.
Will test non aesni (sw build) as well.

Current errata:

- gate fully implemneted for all minig activities (cpu-miner.c) with no violations of the gate.

- utility functions (util.c) not yet converted.

- algo aliases not working, must use lyra2re and lyra2rev2

- axiom algo not working

- hash rate output for share submission doesn't scale fo rvery low hash rates.

- all major algos have been tested, obscure algos have more custom gate functions and are therefore more
  likely to have issues and may not be fully tested.

- non aesni will be tested

- no windows version

- dev preview will be production code (ie no debug) but still has commenetd out sections
  of the old code in places for comparison and testing purposes.

- SSE2 versions not recommended in v3.1, use 3.0.7 instead

All issues to be addressed before final release of v3.1 but will not delay dev's preview.
legendary
Activity: 1470
Merit: 1114
Preliminary testing of quark using the algo_gate has increased performance 4%,
completely unexpected. I dodn't see any imnherent opportunities for increases
unless the smaller code base caches better.
legendary
Activity: 1470
Merit: 1114
Yet another algo_gate update.

I have slighly changed th eimplemetaion of algo_gate. Inseatd of every thread that
needs it defined its own and it was up to 7 seperate engines. No wthere is onlu one engine
defined in cpu-miner.c and only visible to it.


Well, that was an interesting, but failed, experiment, and a learning experience. It's back
to multiple gates.

I had defined a global static gate and initialized in in main before creating any threads,
but it kept segfaulting whenver trying to call a gate function, from a thread other than main.

Apparently the defined gate was not global. Each thread had its own private copy and only
one was initialized.

I thought it was simply a matter of initializing the gate in all threads but that didn't work either.
I thought this would work since the compiler bever complained about what I was doing.
I may not have done it properly. I may give that another try when the dust settles.

I eventually went back to each thread defining a local gate. Multiple copies of the same data
but wtf.

So we will have cpu threads +3 gates. The extra 3 are for main, stratum_thread and longpoll_thread.

It's a good thing the gate is lightweight.

Yet another concept with which I am familiar but with a completely foreign implementation.

I also added MH/s units for those high hashing algos. And I may be able to implemt a non aesni
version of cryptonight.
legendary
Activity: 1470
Merit: 1114
Yet another algo_gate update.

I have slighly changed th eimplemetaion of algo_gate. Inseatd of every thread that
needs it defined its own and it was up to 7 seperate engines. No wthere is onlu one engine
defined in cpu-miner.c and only visible to it.

I have noticed some algo specific code didn't do anything so I'll dleete the code and not define
a gate function.

I have decided to drop support for scrypt and scryptn. scrypt cpu miners can use pooler's
cpuminer.

Back to testing.
legendary
Activity: 1470
Merit: 1114
Another update on algo_gate. Testing is going well with x11, quark, neo, cryptonight working. I have
yet to revisit quark and the false positive rejects. It's not "service affecting" as they say. Still unclear
on the effect on performance, if any. I wasn't expecting any.

Had a weird bug in the hash rate display for cryptonight. I could get it to display .02 (kH) or 24000 (mH) but
only got zero when not multiplying. Then it hit me the multiplier was a float and the hashrate was int64
so the multiplication was forcing it to float. With no multiplier the hashrate was still integer. I guess
formatting an int as a float doesn't work very well.

On to test a few more algos, then noaesni. It's getting closer.
legendary
Activity: 1470
Merit: 1114
May I again suggest keeping a github repository, so we can all easily submit patches.

Nice reminder. I don't want struggle with yet another system to learn at this point. From my experience
with c++, autoconf, visual stdio, etc,  it means I will probably be held back by baggage from my profesional carrer
and will have to unlearn it first. I do intend to get on github after 3.1 is released, with or without algo_gate.
legendary
Activity: 1470
Merit: 1114
Hot tip to increase your profit.

When mining with two instances of cpuminer on different
algos I can get a combined hashrate above 100% of either algo mining alone. I mined cryptonight
and quark together with 7 threads each on an 8 thread i7 and each instance reported between 60%
and 70% of the rate when mining alone.

The quark instance reported 80% rejects locally but no rejects and full hashrate at the pool.

The benefit probably depends on the different nature of the two algos. Some combinations may work
better than others. I suspect quark vs cryptonight to be one of the better combinations.

Edit: the rejects are low diff, could this be a target issue. set_target is one of the new gate functions.

legendary
Activity: 2716
Merit: 1094
Black Belt Developer
Thanks for your work joblo. I'll be glad to test it as soon as you feel it's ready.
May I again suggest keeping a github repository, so we can all easily submit patches.
legendary
Activity: 1470
Merit: 1114
algo_gate update

I have a stable build with about half the algo_gate functions enabled. Importantly scanhash
is one of them.

Current status is x11 and quark tested with half the algo_gate functions enabled, No noticeable
change in performance.  Most definitions moved from cpu-miner.c to miner.h.
All algo specific function declarations removed from miner.h as they are no longer needed.

I will proceed to clean up the bloat in the algo files by merging the multiple targets into one
file with the AES_NI code protected by #ifdef.

Then I'll try to fix the broken algo_gate functions but may release a partially implemented version
if it takes too long.

Further update:

All of the original gate functions are are working but I needed to expand the system. each miner_thread
has a gate as expected but the stratum thread also needs one. I also need to create a second gate for
algo specific command line options. It was tricky to implement because the opt_gate could not be
registered until algo aliases were resolved and that was done 5 lines before the first use of the gate.
It also had to be declared static so the registration would survive the functions exit and re-entry.
That aslo required a global flag to prevent re-registration. But it all worked out.

I'm just chasing down the last few references to individual algos in cpu-miner.c. Soon it will be
completely agnostic. Then thourough testing then a dev preview.

Edit: I should add that I have observed a drop in performance since implementing the gate. However,
I have also noticed a drop in the previous release so there may be other variables. If there is
a net loss is performance I will not release cpuminer-opt with the new scanhash engine.
 
legendary
Activity: 1470
Merit: 1114
algo_gate update

I have a stable build with about half the algo_gate functions enabled. Importantly scanhash
is one of them.

Current status is x11 and quark tested with half the algo_gate functions enabled, No noticeable
change in performance.  Most definitions moved from cpu-miner.c to miner.h.
All algo specific function declarations removed from miner.h as they are no longer needed.

I will proceed to clean up the bloat in the algo files by merging the multiple targets into one
file with the AES_NI code protected by #ifdef.

Then I'll try to fix the broken algo_gate functions but may release a partially implemented version
if it takes too long.
Jump to: