Pages:
Author

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

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
June 08, 2011, 07:18:19 AM
Hi. I've made some minor modifications to cpuminer that are x86_64 linux specific.

Here's the list of changes:
- Linux x86_64 tweaked version
- Uses sse2_64 algo by default
- Detects CPUs and sets threads accordingly
- Uses CPU affinity for each thread where appropriate
- Sets scheduling policy to lowest possible
- Minor performance tweaks

The changes aren't entirely portable but Jeff you might be interested in some or all of them.

Grab the source here:
http://ck.kolivas.org/apps/cpuminer-1.0.1a.tar.bz2
sr. member
Activity: 378
Merit: 250
June 08, 2011, 02:24:56 AM
Running into this problem:

make  all-recursive
make[1]: Entering directory `/home/d337z/Desktop/bitcoin-cpuminer'
Making all in compat
make[2]: Entering directory `/home/d337z/Desktop/bitcoin-cpuminer/compat'
make[3]: Entering directory `/home/d337z/Desktop/bitcoin-cpuminer/compat'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/d337z/Desktop/bitcoin-cpuminer/compat'
make[2]: Leaving directory `/home/d337z/Desktop/bitcoin-cpuminer/compat'
Making all in x86_64
make[2]: Entering directory `/home/d337z/Desktop/bitcoin-cpuminer/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/bitcoin-cpuminer/x86_64'
make[2]: Entering directory `/home/d337z/Desktop/bitcoin-cpuminer'
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing    -DHAS_YASM -march=native -O3 -pipe -fomit-frame-pointer -Wall -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:726:3: warning: passing argument 2 of ‘json_load_file’ makes integer from pointer without a cast
/usr/local/include/jansson.h:221:9: note: expected ‘size_t’ but argument is of type ‘struct json_error_t *’
cpu-miner.c:726:3: error: too few arguments to function ‘json_load_file’
/usr/local/include/jansson.h:221:9: note: declared here
make[2]: *** [cpu-miner.o] Error 1
make[2]: Leaving directory `/home/d337z/Desktop/bitcoin-cpuminer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/d337z/Desktop/bitcoin-cpuminer'
make: *** [all] Error 2


I configured with -march=native (Core2) -O3 -pipe -fomit-frame-pointer -Wall.  With -mtune and -mcpu, I get the exact same errors.  Could someone tell me what's going wrong here?  I'm on Ubuntu 11.04 trying to compile this.  I've also tried removing yasm as a means to mitigate against any common errors that may exist between Ubuntu and Mac's setups. So far, no good.
legendary
Activity: 1974
Merit: 1030
June 06, 2011, 04:55:43 PM
Just for the record, with minerd 1.0.1 I get:

Intel(R) Core(TM) i3 CPU M350 @2.27GHz:
790 khash/s/core with 4way (actually running at 930 MHz due to high temperature).

Intel(R) Xeon(R) CPU E5420 @2.50GHz:
1680 khash/s/core with sse2_64.

Quad-Core AMD Opteron(tm) Processor 2376:
2480 khash/s/core with 4way.

Intel(R) Xeon(TM) CPU 3.00GHz:
630 khash/s/core with sse2_64.

Intel(R) Core(TM) i3 CPU 530 @ 2.93GHz:
1220 khash/s/core with 4way (yasm is too old in this machine to have sse2_64).


Edit: added Xeon 3GHz and i3 2.93GHz
newbie
Activity: 12
Merit: 0
June 06, 2011, 04:08:08 PM
Anyone having any luck with this miner on Vista? When I try to run it from the command line, I get the whole "minerd.exe has stopped working"

UAC is off and I've tried running as an Administrator.

Any ideas? Thanks.

newbie
Activity: 7
Merit: 0
June 04, 2011, 05:25:48 PM
Hello, this is a great CPU miner, which succesfully runs on my server.
Now I am trying to get it working on my old PowerPC Mac (G5) with Mac OS X 10.5.
It compiles fine and runs but it seems the calculations  come out wrong.
What could it be? (Im a programmer but not familiar with c/c++).

Error messages:
Code:
[2011-06-04 09:18:58] thread 0: 2848100 hashes, 570.07 khash/sec
[2011-06-04 09:19:02] thread 1: 2943039 hashes, 554.77 khash/sec
[2011-06-04 09:19:03]  Proof: 000000006700fcb54908d3af4fae82fa4717d57ee44c05755f7b617031acca89
Target: 00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
TrgVal? YES (hash < target)
[2011-06-04 09:19:03] thread 0: 2341254 hashes, 547.98 khash/sec
[2011-06-04 09:19:03] DBG: sending RPC call: {"method": "getwork", "params": [ "0000000140778d36387004c7b8ac705f96a406579072c8d7c63421e500001dd100000000bc7a60c5d7decb85a368e889616c602945657ecaa1a263b0c457a9a6af140a4c4de9dc5b1a2694210023b986000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000" ], "id":1}

[2011-06-04 09:19:03] JSON-RPC call failed: {
   "code": -1,
   "message": "Wrong data: checkWork: checkHash wrong"
}
[2011-06-04 09:19:03] submit_upstream_work json_rpc_call failed
[2011-06-04 09:19:03] ...retry after 30 seconds
[2011-06-04 09:19:07] thread 1: 2943039 hashes, 611.45 khash/sec
[2011-06-04 09:19:33] DBG: sending RPC call: {"method": "getwork", "params": [ "0000000140778d36387004c7b8ac705f96a406579072c8d7c63421e500001dd100000000bc7a60c5d7decb85a368e889616c602945657ecaa1a263b0c457a9a6af140a4c4de9dc5b1a2694210023b986000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000" ], "id":1}

[2011-06-04 09:19:33] JSON-RPC call failed: {
   "code": -1,
   "message": "Wrong data: checkWork: this nonce already completed"
}
[2011-06-04 09:19:33] submit_upstream_work json_rpc_call failed
[2011-06-04 09:19:33] ...retry after 30 seconds
newbie
Activity: 51
Merit: 0
June 04, 2011, 04:55:54 AM
So there's no way to use cpuminer on OSX, then?  I was a little thrown off by the OSX build support message...

Remove yasm and everything works fine on OSX.



Could you please explain how to do this?
member
Activity: 98
Merit: 13
June 03, 2011, 04:24:39 PM
The download links work just fine, from multiple locations.
newbie
Activity: 3
Merit: 0
June 03, 2011, 03:14:55 PM
Download links not working for me... can some one upload to rapidshare or sth? tnx
member
Activity: 65
Merit: 10
June 03, 2011, 12:28:43 PM
I kinda assumed you'd know this, ...

OK I got it now. Writing
Code:
"syslog" : true,
in the config.json file, makes it write in the system log file, with it set to 'false' writes the output in the 'standard error'.

Sorry for the little confusion I made.  Smiley

If someone knows something about the docu ... appreciated!
full member
Activity: 373
Merit: 100
June 03, 2011, 11:50:44 AM
Creating and maintaining a thread has a (pretty small) overhead, so for every thread you create, your mining is getting a tiny bit slower. I don't think setting the amount of threads to higher than the amount of logical cores (or perhaps logical cores + 1) is very useful.
Hmmm, I can't confirm this. I experienced around increasing and decreasing the amount of thread and came to the conclusion that the highest sum of hash rate I get with 10 threads, although my server is running at full speed with only 2 threads already.
Since it's measuring in khash/s, and there is a huge variance compared to the overhead, you wouldn't notice unless you started a *really* large amount of threads.

Nothing - it'll be printed to standard output when syslog isn't set. (Also, messing with stuff you don't understand is generally not advisable - did you read the help output properly?)
Huh If I write nothing it will be send to standard error not standard output!!! So what do I write if I want it to standard output (it's a file in my case)?
I kinda assumed you'd know this, but how about?:
Code:
minderd 2>&1
(IOW, whether the output is on stderr or stdout is somewhat of an arbitrary choice, and redirecting is a non-job, anyway; why bother handling another special case just for this? Anyhow, this sort of question is really easily handled by a look into the code, even I understand most of it Wink)

Hmm, again: read the docu?
Where is it? I only red the 'help'.
This is why I shouldn't answer such a long post less than 5 minutes before I have to leave... Embarrassed
That info came from some sort of discussion around long polling, but I can't for the life of me remember where exactly. Sorry, and I hope the answer was somewhat helpful, anyway.
member
Activity: 65
Merit: 10
June 03, 2011, 06:09:30 AM
Thanks for quick response!!!

Creating and maintaining a thread has a (pretty small) overhead, so for every thread you create, your mining is getting a tiny bit slower. I don't think setting the amount of threads to higher than the amount of logical cores (or perhaps logical cores + 1) is very useful.
Hmmm, I can't confirm this. I experienced around increasing and decreasing the amount of thread and came to the conclusion that the highest sum of hash rate I get with 10 threads, although my server is running at full speed with only 2 threads already.

Nothing - it'll be printed to standard output when syslog isn't set. (Also, messing with stuff you don't understand is generally not advisable - did you read the help output properly?)
Huh If I write nothing it will be send to standard error not standard output!!! So what do I write if I want it to standard output (it's a file in my case)?

Hmm, again: read the docu?
Where is it? I only red the 'help'.
full member
Activity: 373
Merit: 100
June 03, 2011, 05:27:26 AM
1. can you tell me what is the difference running 10 threads or 100? The hash-rate is not significantly different using 10 or 100 (in the sum of all threads of each).
Creating and maintaining a thread has a (pretty small) overhead, so for every thread you create, your mining is getting a tiny bit slower. I don't think setting the amount of threads to higher than the amount of logical cores (or perhaps logical cores + 1) is very useful.

2.1. What can I write into to the value of 'syslog' (see "_comment9a" at the moment) if I want to send it to "standard output"?
Nothing - it'll be printed to standard output when syslog isn't set. (Also, messing with stuff you don't understand is generally not advisable - did you read the help output properly?)

2.1. Is the value 'false' correct? It runs, but I get the following output (using 'off' doesn't work):
Quote
[2011-06-03 11:11:53] JSON option no-longpoll invalid
[2011-06-03 11:11:53] JSON option protocol-dump invalid
[2011-06-03 11:11:53] JSON option quiet invalid
I've noticed those, too. Apparently the claim that all config options are also supported in the JSON config file is false.

3. Can you please tell me the exact function of 'scantime'? It looks that it only makes a difference when setting 'no-longpoll' to true!?!
Hmm, again: read the docu?
Basically, there are two conflicting criteria by which minerd can stop working on the current work unit:
  • when a timeout occurs while searching for a share
  • when the server sends new work via the long polling spec
The first criterion is used when the server doesn't support long polling or if it's manually disabled via the config, otherwise the second is used.
member
Activity: 65
Merit: 10
June 03, 2011, 04:52:33 AM
Hi!

1. can you tell me what is the difference running 10 threads or 100? The hash-rate is not significantly different using 10 or 100 (in the sum of all threads of each).

2. I use the config.json file as follows.
Code:
{
"_comment1"  : "(-a XXX) Specify sha256 implementation:",
"_comment1a" : "         c          Linux kernel sha256, implemented in C (default)",
"_comment1b" : "         4way       tcatm's 4-way SSE2 implementation",
"_comment1c" : "         via        VIA padlock implementation",
"_comment1d" : "         cryptopp   Crypto++ C/C++ implementation",
"algo" : "4way",


"_comment2" : "(-q) Disable per-thread hashmeter output (default: off)",
"quiet" : false,


"_comment3" : "(-D) Enable debug output (default: off)",
"debug" : true,


"_comment4" : "Disable X-Long-Polling support (default: enabled)",
"no-longpoll" : false,


"_comment5" : "(-P) Verbose dump of protocol-level activities (default: off)",
"protocol-dump" : false,


"_comment8" : "(-s N) Upper bound on time spent scanning current work, in seconds. (default: 5)",
"scantime" : "5",


"_comment6" : "(-r N) Number of times to retry, if JSON-RPC call fails (default: 10; use -1 for 'never')",
"retries" : "30",


"_comment7" : "(-R N) Number of seconds to pause, between retries (default: 30)",
"retry-pause" : "10",


"_comment9" : "Use system log for output messages (default: standard error)",
"_comment9a" : "'syslog' : '?????'",


"_comment10" : "(-t N) Number of miner threads (default: 1)",
"threads" : "10",


"_comment11" : "URL for bitcoin JSON-RPC server (default: http://127.0.0.1:8332/)",
"url" : "http://btcguild.com:8332",


"_comment12" : "(-u USERNAME) Username for bitcoin JSON-RPC server (default: rpcuser)",
"user" : "abcxyz",


"_comment13" : "(-p PASSWORD) Password for bitcoin JSON-RPC server (default: rpcpass)",
"pass" : "123456"
}

2.1. What can I write into to the value of 'syslog' (see "_comment9a" at the moment) if I want to send it to "standard output"?
2.1. Is the value 'false' correct? It runs, but I get the following output (using 'off' doesn't work):
Quote
[2011-06-03 11:11:53] JSON option no-longpoll invalid
[2011-06-03 11:11:53] JSON option protocol-dump invalid
[2011-06-03 11:11:53] JSON option quiet invalid

3. Can you please tell me the exact function of 'scantime'? It looks that it only makes a difference when setting 'no-longpoll' to true!?!

Thanks and regards

deti
full member
Activity: 373
Merit: 100
June 02, 2011, 11:54:26 PM
Code:
PS C:\CPU-miner> .\minerd.exe --algo c  --url btcguild.com:8332 --userpass 123:456
I'm pretty sure the url argument needs a protocol set, so try
Code:
--url http://btcguild.com:8332

The thread for your pool might provide more concrete details, like the exact command line you need to run.
newbie
Activity: 24
Merit: 0
June 02, 2011, 11:26:24 PM
It looks to me like you're getting an HTML response instead of a JSON one. Something to ask your pool admin about (or double-check the URL you're passing, especially if the pool doesn't use the standard port).
I added :8332 and it worked (and I changed my pw so that one I posted won't work)
newbie
Activity: 1
Merit: 0
June 02, 2011, 11:17:27 PM
Hi,

I downloaded the 1.0 Windows binary installer.

No matter what options I set, it gives me the help message

Code:
PS C:\CPU-miner> .\minerd.exe --algo c  --url btcguild.com:8332 --userpass 123:456

Is this a bug?

Or did I miss something?
full member
Activity: 373
Merit: 100
June 02, 2011, 11:13:04 PM
It looks to me like you're getting an HTML response instead of a JSON one. Something to ask your pool admin about (or double-check the URL you're passing, especially if the pool doesn't use the standard port).
newbie
Activity: 24
Merit: 0
June 02, 2011, 11:01:51 PM
Code:
F:\CPU-miner>cd "F:\CPU-miner"

F:\CPU-miner>minerd.exe --user djinfected --pass dji12406btio --url http://minin
g.bitcoin.cz/ --algo 4way
[2011-06-03 00:00:51] 1 miner threads started, using SHA256 '4way' algorithm.
[2011-06-03 00:00:53] JSON decode failed(1): '[' or '{' expected near '<'
[2011-06-03 00:00:53] json_rpc_call failed, retry after 30 seconds
I don't understand what this means. I get this with the default algo too.
full member
Activity: 373
Merit: 100
June 02, 2011, 04:15:56 PM
Well, just because sha256_sse2_amd64.o is being linked in doesn't mean it will be available as an algorithm (it's basically a dummy object if it doesn't think it can be compiled). You could try adding "-DWANT_X8664_SSE2" to CFLAGS to see whether that helps/produces an error that will help you track this down.
Looking at miner.h, it seems like the only dependencies are a 64-bit environment, SSE2 and yasm, though, so you may want to double-check the output of configure...
full member
Activity: 373
Merit: 100
June 02, 2011, 03:37:10 PM
I'm having problems getting the sse2_64 mode working on Ubuntu. I've read through this thread, and it seems that the major hangups are either having yasm < 1.01 or not actually being on a 64bit OS.

I've installed yasm 1.1 and confirmed that manually using 'yasm --version'. I've also confirmed that my architecture is 64bit using 'uname -m'.

When I run configure using 'CFLAGS="-O3 -Wall -msse2" ./configure' everything appears to go just fine. It detects the yasm version properly.

I am then able to run make, and everything appears to build correctly. Unfortunately, I don't seem to have the option to use the sse2_64 mode. Am I missing something? It even looks to me like it is linking the sse2_64 code into the binary. Here's the last line:

gcc -DHAS_YASM -O3 -Wall -msse2 -pthread  -o minerd cpu-miner.o util.o sha256_generic.o sha256_4way.o sha256_via.o sha256_cryptopp.o sha256_sse2_amd64.o -lcurl compat/jansson/libjansson.a -lpthread x86_64/libx8664.a
If you run:
Code:
minerd --help | grep sse2_64
Do you see any output? It seems to work for me on my 10.10.
Pages:
Jump to: