Pages:
Author

Topic: New demonstration CPU miner available - page 7. (Read 386323 times)

sr. member
Activity: 378
Merit: 250
June 09, 2011, 08:46:05 AM
Words to the wise, CPUminer is incompatible with Jansson 2.0.1 so use what's included and hope it works.  ^_^
sr. member
Activity: 378
Merit: 250
June 09, 2011, 08:37:31 AM
Wait!  We have win!  I entered the Jansson directory I first used to compile with and ran "sudo make uninstall" and it seems to have done the trick.  Thank you!
sr. member
Activity: 378
Merit: 250
June 09, 2011, 08:30:17 AM
Code:
make  all-recursive
make[1]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a'
Making all in compat
make[2]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a/compat'
make[3]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a/compat'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a/compat'
make[2]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a/compat'
Making all in x86_64
make[2]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a/x86_64'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a/x86_64'
make[2]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a'
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing    -DHAS_YASM -g -O3 -msse2 -MT cpu-miner.o -MD -MP -MF .deps/cpu-miner.Tpo -c -o cpu-miner.o cpu-miner.c
cpu-miner.c:27:21: fatal error: jansson.h: No such file or directory
compilation terminated.
make[2]: *** [cpu-miner.o] Error 1
make[2]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a'
make: *** [all] Error 2

Now it just won't find it.
newbie
Activity: 51
Merit: 0
June 09, 2011, 08:06:04 AM
 Grin
sr. member
Activity: 378
Merit: 250
June 09, 2011, 08:03:31 AM
Yeah, I'll have to experiment with it once I get a few books to help me figure out how.  But first I have to get the original source code working.  Any ideas on what's going wrong above?

You have jansson installed and it's an incompatible version with what cpuminer uses? You don't need jansson installed to make it build since it's included in the cpuminer code tarball. Try uninstalling your own version of jansson.
Actually, it's not my own version, I used the repository that Jansson setup.  But I'll give it a try without Jansson installed to see if any similar errors should arise.  Thank you!  I'll keep you posted.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
June 09, 2011, 06:26:49 AM
Yeah, I'll have to experiment with it once I get a few books to help me figure out how.  But first I have to get the original source code working.  Any ideas on what's going wrong above?

You have jansson installed and it's an incompatible version with what cpuminer uses? You don't need jansson installed to make it build since it's included in the cpuminer code tarball. Try uninstalling your own version of jansson.
sr. member
Activity: 378
Merit: 250
June 09, 2011, 06:22:40 AM
Yeah, I'll have to experiment with it once I get a few books to help me figure out how.  But first I have to get the original source code working.  Any ideas on what's going wrong above?
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
June 09, 2011, 01:28:52 AM
JG if you comment out the sysconf for windows you'll have to set a default value for opt_n_threads on windows since it's now zero.
member
Activity: 98
Merit: 13
June 09, 2011, 12:32:35 AM
It is open source.  Nobody said you were not free to experiment Smiley
sr. member
Activity: 378
Merit: 250
June 08, 2011, 11:37:43 PM
I'm not actually certain that the gain would be so small.  If you look at the process of loading and unloading data and how many instruction sets are sent and processed by each core separately, it could offer a modest improvement in speed.  It could also speed-up confirmation times and get smaller results back to the RPC quicker for verification.  It shifts the focus from trying to get multiple results done in time to be sent before the next block, to ensuring that each result gets done and sent quickly giving yourself the possible edge in time.
And it could be that I'm misunderstanding how mining occurs exactly, but all ideas have some value even if they're a bad one.
member
Activity: 98
Merit: 13
June 08, 2011, 10:58:34 PM
Yeah, but what I'm talking about is a different approach I believe.  Mine actually depends on multiple cores or hyperthreading doing different tasks to work as opposed to multiple threads doing the same thing.  If one core falls behind in its work, the other paired core will begin to assist it until the buffer is around 50% before returning to its own task.  But I don't think I can code it.  I know what I want it to do, I just don't know how to tell it if that makes sense.

There is no buffer.  Mining is updating a single 32-bit value, and then restarting sha256(sha256(data)) algorithm

You can get 1 work, and tell multiple threads to work on that if you'd like.  It would reduce load on the upstream server a bit, but seems like too much complexity for too little gain.

sr. member
Activity: 378
Merit: 250
June 08, 2011, 10:47:04 PM
Yeah, but what I'm talking about is a different approach I believe.  Mine actually depends on multiple cores or hyperthreading doing different tasks to work as opposed to multiple threads doing the same thing.  If one core falls behind in its work, the other paired core will begin to assist it until the buffer is around 50% before returning to its own task.  But I don't think I can code it.  I know what I want it to do, I just don't know how to tell it if that makes sense.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
June 08, 2011, 10:08:06 PM
This is why I started hacking on jgarzik's one instead. The c code in it is much more what I'm familiar with and I've dealt with Jeff before Smiley The other cpuminer is the one with the assembly code.
sr. member
Activity: 378
Merit: 250
June 08, 2011, 10:00:25 PM
Yeah, I figured you were just doing some optimizations.  But I've learned that sometimes things get accidentally fixed while meaning to change something else.  So wanted to cover that base.  I'm about to attempt a compilation with MinGW to see if I can get a better compile than I already have by playing around with some options such as removing frame pointers, enabling other SSE specific optimizations and the like.  I hope to end with a 64-bit Windows compatible compile, but who knows.  I was also contemplating a different method of calculating the hashes by having two or more cores working on the same hash and giving each a specific job to complete.  By breaking it down, I'm hoping it might put the cpu/gpu's memory to good use while decreasing latency between instructions.  The main issue I know of is having one task taking longer than another and needing to optimize the timings of when one core should help another to fill the buffer and then switch back to its task.  A sort of CPU/GPU buffer under run protection so to speak.  But the biggest issue is I have no idea how to start coding it.  It screams assembly.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
June 08, 2011, 08:52:21 PM
Hi Jeff Wink

Yeah I'll get more organised and do so tonight.

Done. Pull request generated. I've modified the code accordingly to try and build still elsewhere. Please check the changes as I can't compile test on other OSs.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
June 08, 2011, 06:43:18 PM
Hi Jeff Wink

Yeah I'll get more organised and do so tonight.
member
Activity: 98
Merit: 13
June 08, 2011, 06:40:08 PM
Welcome, fellow kernel dev Smiley

Any chance you can turn those changes into a pull request?

OS-specific tweaks are fine, as long as the other platforms continue to build and work.

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
June 08, 2011, 05:55:18 PM
I'm sorry the timing in relation to your bug report was coincidence. I wasn't trying to fix your problem.

It is of course the recommended settings hard coded in, but you'll see there was more mentioned in the changelog. It detects the number of CPUs and sets threads accordingly, it only runs the actual mining threads at lower priority (and not the master or work gathering threads), it sets the CPU affinity now which can improve throughput, it utilises the lower priority scheduling policies wherever possible (by trying to set SCHED_IDLE first and then if it fails, SCHED_BATCH before dropping back to just nice 19) and it has some minor optimisations.
sr. member
Activity: 378
Merit: 250
June 08, 2011, 08:40:39 AM
It's the same thing while only using the suggested settings BTW; I know I showed using mmx, sse, sse2, sse3 and a few other specific settings.  But this problem remains.
sr. member
Activity: 378
Merit: 250
June 08, 2011, 08:36:18 AM
Code:
make  all-recursive
make[1]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a'
Making all in compat
make[2]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a/compat'
make[3]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a/compat'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a/compat'
make[2]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a/compat'
Making all in x86_64
make[2]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a/x86_64'
/usr/bin/yasm -f elf64 sha256_xmm_amd64.asm
rm -f libx8664.a
ar cru libx8664.a sha256_xmm_amd64.o
ranlib libx8664.a
make[2]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a/x86_64'
make[2]: Entering directory `/home/d337z/Desktop/cpuminer-1.0.1a'
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing    -DHAS_YASM -march=native -O3 -msse -mmmx -msse2 -msse3 -pipe -fomit-frame-pointer -MT cpu-miner.o -MD -MP -MF .deps/cpu-miner.Tpo -c -o cpu-miner.o cpu-miner.c
cpu-miner.c: In function ‘parse_arg’:
cpu-miner.c:761:3: warning: passing argument 2 of ‘json_load_file’ makes integer from pointer without a cast
/usr/include/jansson.h:221:9: note: expected ‘size_t’ but argument is of type ‘struct json_error_t *’
cpu-miner.c:761:3: error: too few arguments to function ‘json_load_file’
/usr/include/jansson.h:221:9: note: declared here
make[2]: *** [cpu-miner.o] Error 1
make[2]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/d337z/Desktop/cpuminer-1.0.1a'
make: *** [all] Error 2
Same prob with the newer version.
Pages:
Jump to: