starbock (OP)
Newbie
Offline
Activity: 5
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/question.gif) |
November 23, 2015, 09:47:27 PM |
|
Hi! Newbie question...
What is the proper way to pass --enable-cpumining to compile bfgminer, and do I need to do anything else to do CPU mining (yes, I know - I'm not 100% newbie)? I understand that to recompile the included miners in Minera I have to do:
cd /var/www/minera ./build_miner.sh bfgminer
So, my question is where/how to pass the --enable-cpumining option to enable CPU mining in bfgminer (and if there is something else that I need to do).
I went into /var/www/minera/build_miner.sh and added --enable-cpumining to the BFGMINER_CONFIG line (it now looks like this: BFGMINER_CONFIG="--enable-scrypt --enable-broad-udevrules --enable-cpumining"). That didn't seem to do anything. This is all that I get:
For LTC (bfgminer --scrypt --cpu-threads 1):
[2015-11-23 16:22:10] Pool 0 stratum+tcp://ltc.pool.minergate.com:3336 alive [2015-11-23 16:22:10] Probing for an alive pool [2015-11-23 16:22:10] Pool 0 stratum+tcp://ltc.pool.minergate.com:3336 alive [2015-11-23 16:22:10] Network difficulty changed to 42.3k (303.1G) [2015-11-23 16:22:10] Stratum from pool 0 detected new block [2015-11-23 16:22:11] Pool 0 is hiding block contents from us [2015-11-23 16:24:11] Stratum connection to pool 0 interrupted [2015-11-23 16:26:12] Stratum connection to pool 0 interrupted [2015-11-23 16:28:12] Stratum connection to pool 0 interrupted [2015-11-23 16:28:13] Stratum from pool 0 detected new block [2015-11-23 16:30:13] Stratum connection to pool 0 interrupted [2015-11-23 16:30:14] Stratum from pool 0 detected new block [2015-11-23 16:32:14] Stratum connection to pool 0 interrupted
For BTC (bfgminer --cpu-threads 1):
[2015-11-23 16:29:28] Pool 0 stratum+tcp://btc.pool.minergate.com:3335 alive [2015-11-23 16:29:28] Probing for an alive pool [2015-11-23 16:29:28] Pool 0 stratum+tcp://btc.pool.minergate.com:3335 alive [2015-11-23 16:29:28] Network difficulty changed to 65.8G (471.4P) [2015-11-23 16:29:28] Stratum from pool 0 detected new block [2015-11-23 16:29:28] Pool 0 is hiding block contents from us [2015-11-23 16:31:28] Stratum connection to pool 0 interrupted [2015-11-23 16:32:07] Stratum connection to pool 0 interrupted [2015-11-23 16:34:39] Stratum from pool 0 detected new block
I get the same results if I go to other pools, so I konw it's not the pool. And, I can use the system otherwise, so there isn't an obvious network/connectivity problem.
Thanks for all useful/helpful replies, and please do not waste everyone's bandwidth with the obvious "one cannot generate bitcoins with CPU mining."
|
|
|
|
achow101
Staff
Legendary
Offline
Activity: 3486
Merit: 6820
Just writing some code
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 23, 2015, 09:51:15 PM |
|
Yes you need to have --enable-cpumining in order to have cpumining enabled. You also need yasm to enable it. You can download it from http://yasm.tortall.net/
|
|
|
|
starbock (OP)
Newbie
Offline
Activity: 5
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 23, 2015, 10:51:46 PM |
|
Yes you need to have --enable-cpumining in order to have cpumining enabled. You also need yasm to enable it. You can download it from http://yasm.tortall.net/As I mentioned, I added the --enable-cpumining to the build_miner.sh script. After installing yasm I re-compiled bfgminer (without any mods to anything else, hoping it'll just "pick it up"). Was that correct, or do I need to do something else to leverage yasm (never used it before, so unfamiliar)? The new compiled bfgminer appears to behave just like the old one, so I see no change. Thanks!
|
|
|
|
GriffinHeart
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 182
Merit: 100
Hello there!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 24, 2015, 12:04:22 PM |
|
May I ask for what reason you want to CPU mine? I'm sure you know it's obsolete but what exactly are you mining, I can see litecoin and bitcoin bfg-miner codes, but mining CPU on these coins is incredibly obsolete in the modern day. Is it just to test your CPU?
|
Hi there, I'm from South Africa. This means I'm poor, I guess.
|
|
|
achow101
Staff
Legendary
Offline
Activity: 3486
Merit: 6820
Just writing some code
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 24, 2015, 02:28:08 PM |
|
Yes you need to have --enable-cpumining in order to have cpumining enabled. You also need yasm to enable it. You can download it from http://yasm.tortall.net/As I mentioned, I added the --enable-cpumining to the build_miner.sh script. After installing yasm I re-compiled bfgminer (without any mods to anything else, hoping it'll just "pick it up"). Was that correct, or do I need to do something else to leverage yasm (never used it before, so unfamiliar)? The new compiled bfgminer appears to behave just like the old one, so I see no change. Thanks! What OS are you using? Did you install yasm through download or through the package manager? e.g on ubuntu sudo apt-get install yasm Also check that you have all of the dependencies for bfgminer installed. You can find the list and instructions for building at https://github.com/luke-jr/bfgminer/blob/bfgminer/README
|
|
|
|
starbock (OP)
Newbie
Offline
Activity: 5
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 25, 2015, 02:35:50 PM |
|
Thanks for the pointers! So, I made it some of the newbie compile issues...progress...and appear to be in the running phase. This is my runtime output:
[2015-11-25 14:32:08] Summary of runtime statistics:
[2015-11-25 14:32:08] Started at [2015-11-25 08:02:32] [2015-11-25 14:32:08] Pool: stratum+tcp://ltc.pool.minergate.com:3336 [2015-11-25 14:32:08] CPU hasher algorithm used: sse2_32 [2015-11-25 14:32:08] Runtime: 6 hrs : 29 mins : 36 secs [2015-11-25 14:32:08] Average hashrate: 0.0 Megahash/s [2015-11-25 14:32:08] Solved blocks: 0 [2015-11-25 14:32:08] Best share difficulty: 0 [2015-11-25 14:32:08] Share submissions: 0 [2015-11-25 14:32:08] Accepted shares: 0 [2015-11-25 14:32:08] Rejected shares: 0 + 0 stale (-nan%) [2015-11-25 14:32:08] Accepted difficulty shares: 0 [2015-11-25 14:32:08] Rejected difficulty shares: 0 [2015-11-25 14:32:08] Hardware errors: 0 [2015-11-25 14:32:08] Network transfer: 205.1 / 116.1 kB ( 8.8 / 5.0 B/s) [2015-11-25 14:32:08] Efficiency (accepted shares * difficulty / 2 KB): 0.00 [2015-11-25 14:32:08] Utility (accepted shares / min): 0.00/min
[2015-11-25 14:32:08] Unable to get work from server occasions: 194 [2015-11-25 14:32:08] Work items generated locally: 5257 [2015-11-25 14:32:08] Submitting work remotely delay occasions: 0 [2015-11-25 14:32:08] New blocks detected on network: 93
[2015-11-25 14:32:08] Summary of per device statistics:
[2015-11-25 14:32:08] CPU0 | 20s:217.9 avg:218.6 u: 0.0 h/s | A:0 R:0+ 0(none) HW:0/none [2015-11-25 14:32:08] CPU1 | 20s:217.9 avg:218.8 u: 0.0 h/s | A:0 R:0+ 0(none) HW:0/none [2015-11-25 14:32:08] CPU2 | 20s:217.9 avg:218.6 u: 0.0 h/s | A:0 R:0+ 0(none) HW:0/none [2015-11-25 14:32:08] CPU3 | 20s:217.0 avg:218.1 u: 0.0 h/s | A:0 R:0+ 0(none) HW:0/none [2015-11-25 14:32:08] CPU4 | 20s:218.3 avg:219.0 u: 0.0 h/s | A:0 R:0+ 0(none) HW:0/none [2015-11-25 14:32:08] CPU5 | 20s:217.9 avg:218.9 u: 0.0 h/s | A:0 R:0+ 0(none) HW:0/none [2015-11-25 14:32:08] CPU6 | 20s:217.9 avg:218.7 u: 0.0 h/s | A:0 R:0+ 0(none) HW:0/none [2015-11-25 14:32:08] CPU7 | 20s:217.8 avg:218.7 u: 0.0 h/s | A:0 R:0+ 0(none) HW:0/none [2015-11-25 14:32:08] Shutdown signal received.
There's a connection. CPUs are detected and used. There's protocol-level dialog. The pool sees me connected. There is no work being submitted...
I can use cpuminer to create work on the same pool(s) that I've tested, and I've tried using bfgminer against multiple pools without success. So, I don't suspect the pools.
Any suggestions/ideas on what might be going on? Thanks for the help!!!
|
|
|
|
achow101
Staff
Legendary
Offline
Activity: 3486
Merit: 6820
Just writing some code
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 25, 2015, 02:47:12 PM |
|
= There's a connection. CPUs are detected and used. There's protocol-level dialog. The pool sees me connected. There is no work being submitted...
I can use cpuminer to create work on the same pool(s) that I've tested, and I've tried using bfgminer against multiple pools without success. So, I don't suspect the pools.
Any suggestions/ideas on what might be going on? Thanks for the help!!!
Not really sure why that may be the case. It probably has to do with bfgminer. bfgminer is not optimized for CPU mining so it may not be able to hash as quickly as cpuminer does. Honestly, I would expect that you don't submit any work when cpu mining because the pool difficulty is probably too high anyways.
|
|
|
|
starbock (OP)
Newbie
Offline
Activity: 5
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 25, 2015, 03:01:56 PM |
|
Thanks! I was hoping to get some benchmark information to help me assess cpuminer's and others' relative performance on this server. cpuminer is doing 0.5 H/s per CPU, barely 4H/s on an 8-way 2.6GHz (admitedly, ancient 32-bit XEONs but, still, more CPU than a modern era calculator...oh, wait, the smartphone replaced the calculator...forgot...)
So, the basic question is why would cpuminer be able to get 0.5 H/s per CPU for LTC mining while bfgminer can't even submit a single hash? Meanwhile, I get 40H/s on my 1.6GHz laptop... Something is not adding up here...
|
|
|
|
achow101
Staff
Legendary
Offline
Activity: 3486
Merit: 6820
Just writing some code
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 25, 2015, 03:04:55 PM |
|
So, the basic question is why would cpuminer be able to get 0.5 H/s per CPU for LTC mining while bfgminer can't even submit a single hash? Meanwhile, I get 40H/s on my 1.6GHz laptop... Something is not adding up here...
LTC mining uses scrypt. Is bfgminer started in scrypt mode? If it isn't, then it won't work correctly. What are you using on your laptop for mining?
|
|
|
|
starbock (OP)
Newbie
Offline
Activity: 5
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 26, 2015, 11:14:54 PM |
|
So, the basic question is why would cpuminer be able to get 0.5 H/s per CPU for LTC mining while bfgminer can't even submit a single hash? Meanwhile, I get 40H/s on my 1.6GHz laptop... Something is not adding up here...
LTC mining uses scrypt. Is bfgminer started in scrypt mode? If it isn't, then it won't work correctly. What are you using on your laptop for mining? Happy Thanksgiving! Hi, yes. I start bfgminer with --scrypt when doing LTC mining. I'm using MinerGate's GUI and CLI miners on my laptop with consistent results - about 60 H/s average (40 - 80 range, sometimes much higher, around 120 H/s, but for short periods of time usually). The numbers on the server are way off (on cpuminer), and I cannot explain why bfgminer isn't submitting any work... Would any additional information help? Debug logs or anything else? Thanks for all your help!
|
|
|
|
|