Bitcoin Forum
November 15, 2018, 05:12:23 AM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 »
  Print  
Author Topic: An (even more) optimized version of cpuminer (pooler's cpuminer, CPU-only)  (Read 1952206 times)
pooler
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500


View Profile
February 02, 2014, 03:56:47 PM
 #861

Checksums in the first post don't match with the files, more specifically with the win32 one... Anything wrong?
Re-downloaded it just now from Sourceforge, and it matches.
Code:
$ sha256sum pooler-cpuminer-2.3.2-win32.zip
5cd04f0324f9f18f4bd989e981b1ac72edb68bf6b76498e616d22cfe0a798122  pooler-cpuminer-2.3.2-win32.zip

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
1542258743
Hero Member
*
Offline Offline

Posts: 1542258743

View Profile Personal Message (Offline)

Ignore
1542258743
Reply with quote  #2

1542258743
Report to moderator
1542258743
Hero Member
*
Offline Offline

Posts: 1542258743

View Profile Personal Message (Offline)

Ignore
1542258743
Reply with quote  #2

1542258743
Report to moderator
1542258743
Hero Member
*
Offline Offline

Posts: 1542258743

View Profile Personal Message (Offline)

Ignore
1542258743
Reply with quote  #2

1542258743
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542258743
Hero Member
*
Offline Offline

Posts: 1542258743

View Profile Personal Message (Offline)

Ignore
1542258743
Reply with quote  #2

1542258743
Report to moderator
1542258743
Hero Member
*
Offline Offline

Posts: 1542258743

View Profile Personal Message (Offline)

Ignore
1542258743
Reply with quote  #2

1542258743
Report to moderator
unamis76
Legendary
*
Offline Offline

Activity: 1414
Merit: 1000


View Profile
February 02, 2014, 04:57:11 PM
 #862

Checksums in the first post don't match with the files, more specifically with the win32 one... Anything wrong?
Re-downloaded it just now from Sourceforge, and it matches.
Code:
$ sha256sum pooler-cpuminer-2.3.2-win32.zip
5cd04f0324f9f18f4bd989e981b1ac72edb68bf6b76498e616d22cfe0a798122  pooler-cpuminer-2.3.2-win32.zip

It matches. My mistake. Thank you.
HenriH
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
February 02, 2014, 05:02:47 PM
 #863

https://github.com/cbuchner1/CudaMiner/commit/670c8ea83346006180ece0994c6044536873b9f9

Quote
--time-limit      maximum time (s) to mine before exiting the program.

Would be cool to see --time-limit parameter in cpuminer, too.
pooler
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500


View Profile
February 02, 2014, 05:44:30 PM
 #864

Quote
--time-limit      maximum time (s) to mine before exiting the program.
Would be cool to see --time-limit parameter in cpuminer, too.
The same result can be obtained by using the timeout command from GNU coreutils (also available via Cygwin and Homebrew).

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
itsik78
Full Member
***
Offline Offline

Activity: 434
Merit: 100


Join FlipNpik Telegram : t.me/flipnpikico


View Profile
February 03, 2014, 04:23:49 PM
 #865

Here's a great 24 hours comparison done by ReviewOutlaw for ALL CPU COINS.
http://www.reviewoutlaw.com/most-profitable-cpu-coin-list-alt-coin-profits-24-hours-mining/

Guess who the winner is? Smiley
MemoryCoin of course!

Here's another thread explaining how to CPU mine MMC efficiently:
https://bitcointalk.org/index.php?topic=439874
(This doesn't use CPUMiner but rather a different miner which is built specifically for MMC mining)


linuxdoctor
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
February 05, 2014, 05:24:45 AM
 #866

I'm new to Bitcoin and this forum and am trying to learn all I can about it. One way I've always found to learn how things work is to go through the code.  I've already slogged through the code standard Bitcoin implementation, bitcoind/bitcoin-qt, and some of BitcoinArmory. I'm now looking through cpuminer. The code for cpuminer is fairly easy to read being written in standard C.

I understand most of what's going on but I've got a few questions about what I've found in the code. Actually, it's a question about some curious code. Here's the extract from cpu-miner.c. I've removed the irrelevant portions.
Code:
static void *miner_thread(void *userdata)
{
. . .
uint32_t end_nonce = 0xffffffffU / opt_n_threads * (thr_id + 1) - 0x20;
. . .
if (memcmp(work.data, g_work.data, 76)) {
memcpy(&work, &g_work, sizeof(struct work));
work.data[19] = 0xffffffffU / opt_n_threads * thr_id;
} else
work.data[19]++;
. . .
}
This code appears to set up an initial start and end boundary for nonce checking on new work. It also seems to be attempting some cleverness to avoid doing expensive computation on 'long long int' type.  I'm assuming that the intent is to set start and end boundaries at the beginning of each thread's block (relative offset of 0) and then then end at one by before the start of the next thread's block. That's not what the effect is and the following block shows:
Code:
thread = 0 start_nonse = 0x00000000 end_nonse = 0x1fffffdf
thread = 1 start_nonse = 0x1fffffff end_nonse = 0x3fffffde
thread = 2 start_nonse = 0x3ffffffe end_nonse = 0x5fffffdd
thread = 3 start_nonse = 0x5ffffffd end_nonse = 0x7fffffdc
thread = 4 start_nonse = 0x7ffffffc end_nonse = 0x9fffffdb
thread = 5 start_nonse = 0x9ffffffb end_nonse = 0xbfffffda
thread = 6 start_nonse = 0xbffffffa end_nonse = 0xdfffffd9
thread = 7 start_nonse = 0xdffffff9 end_nonse = 0xffffffd8
I created a programme that output the boundaries of each thread block and this is what I got.

The question is: is this intentional, and if so to what end? I know that the end boundary is later adjusted (downwards) based on the hash rate of the machine that the programme calculates on a running basis. It just seems a little odd to me. If this is a bug, a simple fix will make the cleverness work.

Thanks for you insite.
pooler
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500


View Profile
February 05, 2014, 08:20:46 AM
 #867

I understand most of what's going on but I've got a few questions about what I've found in the code. Actually, it's a question about some curious code. Here's the extract from cpu-miner.c. I've removed the irrelevant portions.
Code:
static void *miner_thread(void *userdata)
{
. . .
uint32_t end_nonce = 0xffffffffU / opt_n_threads * (thr_id + 1) - 0x20;
. . .
if (memcmp(work.data, g_work.data, 76)) {
memcpy(&work, &g_work, sizeof(struct work));
work.data[19] = 0xffffffffU / opt_n_threads * thr_id;
} else
work.data[19]++;
. . .
}
This code appears to set up an initial start and end boundary for nonce checking on new work. It also seems to be attempting some cleverness to avoid doing expensive computation on 'long long int' type.  I'm assuming that the intent is to set start and end boundaries at the beginning of each thread's block (relative offset of 0) and then then end at one by before the start of the next thread's block. That's not what the effect is and the following block shows:
Code:
thread = 0 start_nonse = 0x00000000 end_nonse = 0x1fffffdf
thread = 1 start_nonse = 0x1fffffff end_nonse = 0x3fffffde
thread = 2 start_nonse = 0x3ffffffe end_nonse = 0x5fffffdd
thread = 3 start_nonse = 0x5ffffffd end_nonse = 0x7fffffdc
thread = 4 start_nonse = 0x7ffffffc end_nonse = 0x9fffffdb
thread = 5 start_nonse = 0x9ffffffb end_nonse = 0xbfffffda
thread = 6 start_nonse = 0xbffffffa end_nonse = 0xdfffffd9
thread = 7 start_nonse = 0xdffffff9 end_nonse = 0xffffffd8
I created a programme that output the boundaries of each thread block and this is what I got.

The purpose of that piece of code is to share the same work unit (block header) between all miner threads, so that we don't need to fetch different work (if using getwork) or to compute a different Merkle root hash (if using Stratum) for every thread. This is accomplished by partitioning the nonce space and by assigning a distinct nonce range to each thread, so that no two ranges overlap. Because of how mining works, the search over the nonce space doesn't have to be exhaustive, meaning that it is OK if we don't check all possible nonces before fetching new work.
The gap that you see between nonce ranges is needed to avoid checking some nonces twice, as some of the core algorithm implementations may compute more hashes than requested (because of parallelization). The fact that we may skip checking a tiny fraction (0.000004%) of the nonce space is far from being a problem.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
linuxdoctor
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
February 05, 2014, 01:58:01 PM
 #868

The gap that you see between nonce ranges is needed to avoid checking some nonces twice, as some of the core algorithm implementations may compute more hashes than requested (because of parallelization). The fact that we may skip checking a tiny fraction (0.000004%) of the nonce space is far from being a problem.

From a practical viewpoint it is unlikely that anybody would be able to hash every nonce in a given block given the present state of available hardware with the possible exception of banks of super computers deep in the bowels of the NSA or other government entity somewhere. From that perspective the gap is irrelevant. By the same token, even the overlap (without the subtract of 32) is irrelevant also and amounts to about the number of threads and still leaves a gap at the upper end of the 32-bit range.

I just wondered if there was something more specific to mining than that that necessitated the gap. It is the algorithm you use to calculate the range for each thread that attracted my attention. It looks like something I used to do with small microprocessors in embedded applications where I needed to play with numbers larger than the available precision of the machine. Very clever and not something I see often any more. The purist in me, though, would want to see each block on a neat zero boundary with no overlap.

Just for fun I adjusted your algorithm so that each block starts on a neat zero boundary with no overlaps.

Code:
uint32_t end_nonce = 0xffffffffU / opt_n_threads * (thr_id + 1) - 0x20;
becomes
uint32_t end_nonce = 0xffffffffU / opt_n_threads * (thr_id + 1) + thr_id;

and

work.data[19] = 0xffffffffU / opt_n_threads * thr_id;
becomes
  work.data[19] = 0xffffffffU / opt_n_threads * thr_id + thr_id;

This produces (for 8 threads):

thread = 0 start_nonse = 0x00000000 end_nonse = 0x1fffffff
thread = 1 start_nonse = 0x20000000 end_nonse = 0x3fffffff
thread = 2 start_nonse = 0x40000000 end_nonse = 0x5fffffff
thread = 3 start_nonse = 0x60000000 end_nonse = 0x7fffffff
thread = 4 start_nonse = 0x80000000 end_nonse = 0x9fffffff
thread = 5 start_nonse = 0xa0000000 end_nonse = 0xbfffffff
thread = 6 start_nonse = 0xc0000000 end_nonse = 0xdfffffff
thread = 7 start_nonse = 0xe0000000 end_nonse = 0xffffffff

This is using gcc 4.8.2 with -O3 optimization on Fedora linux kernel 3.13.0 and AMD FX8350.

Thanks for your timely response.
pooler
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500


View Profile
February 05, 2014, 02:18:16 PM
 #869

From a practical viewpoint it is unlikely that anybody would be able to hash every nonce in a given block given the present state of available hardware with the possible exception of banks of super computers deep in the bowels of the NSA or other government entity somewhere.
That is incorrect. It only takes about 72 MH/s to check every possible nonce in less than a minute, and dual-CPU systems are already able to attain such rates for SHA-256d.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
linuxdoctor
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
February 05, 2014, 03:10:48 PM
 #870

You're right. I must still be living with the dinosaurs. I'm getting about 5M on my FX8350 running at the standard clock speed of 4.0GHz which is roughly equivalent to running through all 2^32 possible hashes in 107 seconds when all 8 cores are running.

So, that makes the gap and overlap even more important.
imwesigwa
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
February 06, 2014, 10:25:01 AM
 #871

Hello,

Am a newbie trying to setup CPUMiner of a 64bit 4 core RedHat Environment.
I have run into the following errors while installing mining_proxy.

Any Help will be appreciated.
Code:
Extracting stratum_mining_proxy-1.5.2-py2.4.egg to /usr/lib/python2.4/site-packages
  File "/usr/lib/python2.4/site-packages/stratum_mining_proxy-1.5.2-py2.4.egg/mining_libs/stratum_listener.py", line 133
    result = (yield self._f.rpc('mining.authorize', [worker_name, worker_password]))
                  ^
SyntaxError: invalid syntax
  File "/usr/lib/python2.4/site-packages/stratum_mining_proxy-1.5.2-py2.4.egg/mining_libs/utils.py", line 63
    (yield d)
         ^
SyntaxError: invalid syntax
  File "/usr/lib/python2.4/site-packages/stratum_mining_proxy-1.5.2-py2.4.egg/mining_libs/midstate.py", line 80
    consts = K if rounds is None else K[:rounds]
                ^
SyntaxError: invalid syntax
Plus
Member
**
Offline Offline

Activity: 153
Merit: 10

Enjoy


View Profile
February 06, 2014, 10:59:53 AM
 #872

hello dear, i need help
using Binaries for Linux: http://sourceforge.net/projects/cpuminer/files/pooler-cpuminer-2.3.2-linux-x86_64.tar.gz (x86-64)
os: Linux new 2.6.18-348.4.1.el5.centos.plus #1 SMP Tue Apr 16 18:51:49 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
./minerd --url=stratum+tcp://s.eu.vertcoin.org:3333 --userpass=Plus.s741:coolmegapass

and work problem:
Failed to get Stratum session id
and
DEBUG: reject reason: Share is above target

printscreen http://clip2net.com/s/6Lfb2Z


booooo/booooo/booooo/booooo/booooo ((((

Oвepклoкepcкaя пpoшивкa и aдминкa для S9  - https://bitcointalk.org/index.php?topic=5041656
electricfeel
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
February 08, 2014, 12:19:10 AM
 #873

hello pooler, I have used your cpuminer for doge and ltc. I just started using it for maxcoin and It pops up and runs fine but I get a 0.00% and boo, tried running it like the following below.

using your 2.3.2-win 32 and stratum

1: minerd.exe  -o  stratum+tcp://maxcoinpool.com:4000  -u worker.1 -password
2: minerd.exe  -o  stratum+tcp://www.maxcoinpool.com:4000  -u worker.1 -password

its a command line and not sure what to do, any advice?
PSL
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
February 08, 2014, 01:43:17 AM
 #874

hello pooler, I have used your cpuminer for doge and ltc. I just started using it for maxcoin and It pops up and runs fine but I get a 0.00% and boo, tried running it like the following below.

This version of cpuminer cannot be used to mine maxcoin because that coin needs a miner with support for "keccak" algorithm.

           TWITTER ◣                        ☆☆☆✩✩✩✩ IAME ☆✩✩✩✩☆☆                        ◢ WHITEPAPERJOIN
                     WEBSITE ◣                         ☆✩✩Fragmented☆✩✩                         ◢ MEDIUM            ◢ AIRDROP
         TELEGRAM ◣                        ☆☆☆Identity☆☆☆                        ◢ FACEBOOK     ◢ NOW
Pontius
Full Member
***
Offline Offline

Activity: 225
Merit: 100


View Profile
February 08, 2014, 11:20:47 AM
 #875

Sun Fire T1000 6-core @ 1GHz
Oracle Solaris 11.1

at 24 threads each gets .06kh/s =1.44kh/s

They're $75 on ebay, 180W power consumption.

If I mine all month I can turn $10 of power into 75 cents worth of altcoins Cheesy

compiling with -O3 made this .07 per thread, for a total of 1.68Kh/s

Compiling it with SunStudio instead of GCC will give you maybe even a little more (didn't test this for an "eternity" though).
BTW, running more threads then you a have physical cores on a Niagara based systems will gain you absolutely nothing. 
primer-
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000



View Profile
February 08, 2014, 07:16:14 PM
 #876

Pooler, can you create a new build which includes keccak ? Is the current MaxCoin cpuminer based on your latest version ?
oliversl
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 08, 2014, 09:15:34 PM
 #877

It would be nice to have an official build after the maxcoin launch, thanks
HammerHedd
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile WWW
February 12, 2014, 05:32:10 PM
 #878

I have a quick question about darkcoin:

I"m trying to run minerd with -a X11 for the darkcoin algorithm, and all I get is the message "type --help for more information". If I leave out -a X11, I can connect to the pool fine via stratum, but of course all my hashes are rejected.

I don't see any X11 specific source in the git clone, but I'm no programmer, so I might not know where to look if it isn't obvious.

What am I doing wrong?

BTW, it seems to work fine on windows with a pre-compiled version. This is failing on Ubuntu with me compiling from the latest git (2.3.2).

DRK: XepkHLT2MYTXSFDc2muiGeA9eRzG6ytpSy       P2Pool: stratum+tcp://darkcoin.kicks-ass.net:7903
BTC: 1LVE3pFpAhSrHbiK5hAUWDeVrB5UrPXRkJ                    http://darkcoin.kicks-ass.net
splat44
Sr. Member
****
Offline Offline

Activity: 386
Merit: 250



View Profile
February 13, 2014, 09:58:21 PM
 #879

Using latest pooler for windows while mining dogecoin, cannot connect to server: ypool.net:8332 even after using xptProxy v0.2b

Can anyone double check this?

edited

Ok, I found out that I need using localhost:8332
DarkCloud
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
February 17, 2014, 03:43:11 PM
 #880

Hi

Here is a small script for multiple choices when using the cpuminer, for anyone interested.
I was tired of having multiple files for pools, and here is the result of pure boredom :lol:

Just copy to a .cmd file and replace MINER.URL:PORT and USER:PASSWORD, except for the last url where port is %port%
Added a few menu items as an example at the top.

have phun Smiley

Code:
@:Multipool Multi (ALL):7777
@:Multipool Litecoin (LTC):3334
@:Multipool FeatherCoin (FTC):3337
@:Multipool Mincoin (MNC):3339
@:Multipool WorldCoin (WDC):3342
@:Multipool DigitalCoin (DGC):3343
@:Multipool NovaCoin (NVC):3344
@:Multipool LuckyCoin (LKY):3345
@:Multipool Argentum (ARG):3346
@:Multipool PhenixCoin (PXC):3347
@:Multipool MegaCoin (MEC):3348
@:Multipool BottleCaps (CAP):3349
@:Multipool Cryptogenic Bullion (CGB):3336
@:Multipool DogeCoin (DOGE):3352
@:Multipool Diamond (DMD):3354
@:Multipool Grandcoin (GDC):3356
@:Multipool FedoraCoin (TIPS):3357
@:Multipool Mooncoin (MOON):3358
@:Multipool Earthcoin (EAC):3359
@:Multipool Lottocoin (LOT):3360
@:Coin-Pool.org (LTC):0000
@:DogeCoin Pool (DOGE):0001
@:NyanCoin Pool (NYAN):0002
@:PotCoin Pool (POT):0003
@echo off
:start
set "var=@"
for /f "tokens=1,2 delims=:@" %%a in ('findstr /n "%var%:" "%~f0" ') do (
echo %%a %%b
)
echo.
set /p "num=Select a number: "
for /f "tokens=1,2,3 delims=:@" %%a in ('findstr /n "%var%:" "%~f0" ^|findstr "^%num%:" ') do (
set "name=%%b"
set "port=%%c"
)
echo starting %name%:%port%
title We are mining "%name%"
if %port% EQU 0000 (
   minerd -a scrypt -o stratum+tcp://MINER.URL:PORT -O USER:PASSWORD -q
  )
if %port% EQU 0001 (
   minerd -a scrypt -o stratum+tcp://MINER.URL:PORT -O USER:PASSWORD -q
  )
if %port% EQU 0002 (
   minerd -a scrypt -o stratum+tcp://MINER.URL:PORT -O USER:PASSWORD -q
  )
if %port% EQU 0003 (
   minerd -a scrypt -o stratum+tcp://MINER.URL:PORT -O USER:PASSWORD -q
  ) else (
   minerd -a scrypt -o stratum+tcp://MINER.URL:%port% -O USER:PASSWORD -q
)
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!