Search content
Sort by

Showing 16 of 16 results by verement
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: Ufasoft Miner Thread - SSE2-optimized for Intel CPUs, version 0.10 (2011-May)
by
verement
on 28/06/2011, 06:51:36 UTC
The following patch will improve SSE2 performance slightly by eliminating one instruction. I recently submitted the same patch for cpuminer.

Code:
diff --git a/sha256sse.asm b/sha256sse.asm
index 33d5a85..981cd96 100644
--- a/sha256sse.asm
+++ b/sha256sse.asm
@@ -210,12 +210,11 @@ ENDIF
        movdqa  xmm3, xmm4                      ; d = c
        movdqa  xmm2, xmm4                      ; c
        pand    xmm2, xmm5                      ; b & c
-       pand    xmm4, xmm7                      ; a & c
-       pand    xmm1, xmm7                      ; a & b
-       pxor    xmm1, xmm4
+       pxor    xmm1, xmm4                      ; b ^ c
+       pand    xmm1, xmm7                      ; a & (b ^ c)
+       pxor    xmm1, xmm2                      ; (a & (b ^ c)) ^ (b & c)
        movdqa  xmm4, xmm5                      ; c = b
        movdqa  xmm5, xmm7                      ; b = a
-       pxor    xmm1, xmm2                      ; (a & c) ^ (a & d) ^ (c & d)
        paddd   xmm6, xmm1                      ; t1 + ((a & c) ^ (a & d) ^ (c & d))
               
        movdqa  xmm2, xmm7

I imagine something similar could be done for the x86 asm, though I haven't tried it yet.
Post
Topic
Board Beginners & Help
Re: Compile error on PS3
by
verement
on 22/06/2011, 03:22:26 UTC
Because I cant post to correct topic, it goes here.
I'm trying to compile PS3 miner on Fedora 7 and get error below. Maybe verement will notice this post and will answer?

spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mno-safe-hints -Wall    -c -o sha256.o sha256.c
sha256.c: In function 'vec_SHR':
sha256.c:61: warning: implicit declaration of function 'spu_sr'
sha256.c:61: error: incompatible types in return
sha256.c:62: warning: control reaches end of non-void function
make[2]: *** [sha256.o] Error 1
make[2]: Leaving directory `/home/sbernard/cellminer/ext/spu'
make[1]: *** [spu/worker.elf] Error 2
make[1]: Leaving directory `/home/sbernard/cellminer/ext'
make: *** [ext/cellminer.so] Error 2

The declaration for spu_sr should have been provided by which comes with the compiler. Your compiler didn't complain about that file being missing, so something seems odd.

What is the version of your spu-gcc?

If I can find access to a Fedora 7 system maybe I can look better into it.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: Found three ps3 in my basement :)
by
verement
on 11/06/2011, 00:10:32 UTC
There's not really a guide at the moment, but you'll find most of what you need in this thread.

The mining code itself can be found on GitHub.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 22/05/2011, 19:48:42 UTC
Thank you so much! Now it compiles, but it seems I can't get it running.
I really suck at this.
Code:
root@debian:~/verement-cellminer-59057bc# ./cellminer -u myusername -p mypass http://myserver:port
[2011-05-22 13:26:56] Cell Miner starting
[2011-05-22 13:26:56] Creating 6 SPU miner(s)
spu_create(): Function not implemented
/root/verement-cellminer-59057bc/cellminer.rb:136: [BUG] Segmentation fault



I know I've for a bunch of help already, but it says [BUG] so maybe it's not me.

I'd say you're doing pretty well given the dearth of documentation I've provided.

At this point you need to make sure /spu is mounted. See lgeek's post here.

Code:
# mkdir -p /spu
# mount -t spufs none /spu

This is the mechanism through which Linux offers access to the SPEs.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 21/05/2011, 22:53:35 UTC
Code:
root@debian:~/verement-cellminer-59057bc# make
ruby1.9.1 -C ext -E ascii-8bit extconf.rb
checking for spe_context_run() in -lspe2... yes
creating Makefile
make -C ext
make[1]: Entering directory `/root/verement-cellminer-59057bc/ext'
Makefile:230: depend.auto: No such file or directory
make[1]: Leaving directory `/root/verement-cellminer-59057bc/ext'
make[1]: Entering directory `/root/verement-cellminer-59057bc/ext'
gcc -I. -I/usr/include/ruby-1.9.1/powerpc-linux -I/usr/include/ruby-1.9.1/ruby/b                 ackward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-                 aliasing -g -g -O2 -fPIC -Wall  -o cellminer.o -c cellminer.c
gcc -I. -I/usr/include/ruby-1.9.1/powerpc-linux -I/usr/include/ruby-1.9.1/ruby/b                 ackward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-                 aliasing -g -g -O2 -fPIC -Wall  -o spu_miner.o -c spu_miner.c
make -C spu
make[2]: Entering directory `/root/verement-cellminer-59057bc/ext/spu'
Makefile:55: depend.auto: No such file or directory
make[2]: Leaving directory `/root/verement-cellminer-59057bc/ext/spu'
make[2]: Entering directory `/root/verement-cellminer-59057bc/ext/spu'
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fn                 o-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o main.o m                 ain.c
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fn                 o-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o worker.o                  worker.c
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fn                 o-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o sha256.o                  sha256.c
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fn                 o-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o util.o u                 til.c
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fn                 o-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o spu_slih                 .o spu_slih.c
spu-as   -o spu_flih.o spu_flih.s
spu-gcc -o worker.elf  main.o worker.o sha256.o util.o spu_slih.o spu_flih.o
make[2]: Leaving directory `/root/verement-cellminer-59057bc/ext/spu'
embedspu spu_worker spu/worker.elf spu_worker.o
gcc -I. -I/usr/include/ruby-1.9.1/powerpc-linux -I/usr/include/ruby-1.9.1/ruby/b                 ackward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-                 aliasing -g -g -O2 -fPIC -Wall  -o ppu_miner.o -c ppu_miner.c
make -C ppu
make[2]: Entering directory `/root/verement-cellminer-59057bc/ext/ppu'
Makefile:51: depend.auto: No such file or directory
make[2]: Leaving directory `/root/verement-cellminer-59057bc/ext/ppu'
make[2]: Entering directory `/root/verement-cellminer-59057bc/ext/ppu'
gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-st                 rict-aliasing -funroll-loops -mcpu=cell  -Wall -Werror    -c -o worker.o worker.                 c
gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-st                 rict-aliasing -funroll-loops -mcpu=cell  -Wall -Werror    -c -o sha256.o sha256.                 c
gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mcpu=cell  -Wall -Werror    -c -o util.o util.c
ar rc worker.a worker.o sha256.o util.o
make[2]: Leaving directory `/root/verement-cellminer-59057bc/ext/ppu'
gcc -shared -o cellminer.so cellminer.o spu_miner.o spu_worker.o ppu_miner.o ppu/worker.a -L. -L/usr/lib -L.  -rdynamic -Wl,-export-dynamic   -lruby-1.9.1 -lspe2  -lpthread -lrt -ldl -lcrypt -lm   -lc
make[1]: Leaving directory `/root/verement-cellminer-59057bc/ext'

now what went wrong?


I don't see anything wrong in there. Did you try running it?
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 19/05/2011, 04:22:13 UTC
I've put up a new version of Cell Miner, now supporting HTTP keep-alive connections to reduce communication overhead. Thanks to lgeek on GitHub for the idea and initial implementation.

This version requires a different Ruby Gem — be sure to:
Code:
# gem1.9.1 install net-http-persistent

https://github.com/verement/cellminer
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 19/05/2011, 04:08:37 UTC
Getting this error during make.

Code:
[root@debian:~/verement-cellminer-ded41f8# make
make -C ext
make[1]: Entering directory `/root/verement-cellminer-ded41f8/ext'
make -C spu
make[2]: Entering directory `/root/verement-cellminer-ded41f8/ext/spu'
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o main.o main.c
/bin/sh: spu-gcc: not found
make[2]: *** [main.o] Error 127
make[2]: Leaving directory `/root/verement-cellminer-ded41f8/ext/spu'
make[1]: *** [spu/worker.elf] Error 2
make[1]: Leaving directory `/root/verement-cellminer-ded41f8/ext'
make: *** [ext/cellminer.so] Error 2

I think it might be cause the packages aren't working properly.

Any helping getting the packages installed?

So the make will build.

You are probably missing the 'gcc-spu' package. Make sure all the packages listed in the README are installed.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 10/05/2011, 20:16:26 UTC
Ok, thank you! i've used gcc-4.4 now it compile correctly.

22.073 Mhash/s with 6 SPE and 2 PPE Miner.

Nice work verement!

Only one question, what is Backlogged work items?

It's the number of work items that are still unfinished since the last time work was obtained. If this number reaches zero, the SPU/PPU miners will be starved for work. On the other hand, there is little point in keeping a huge backlog, so the work items are trimmed automatically to keep the number reasonable.

The number is essentially just informational. The number will drop each time a new block is being worked on, since the backlog is then essentially useless and has to be cleared. The only time to be concerned (in terms of overall efficiency) is if you have a long period of RPC errors during which the entire backlog is depleted.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 10/05/2011, 17:37:28 UTC
Now i've got this error when i run the make command:
Code:
cd ext && ruby1.9.1 -E ascii-8bit extconf.rb
checking for spe_context_run() in -lspe2... yes
creating Makefile
make -C ext
make[1]: Entering directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext'
Makefile:230: depend.auto: No such file or directory
make[1]: Leaving directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext'
make[1]: Entering directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext'
gcc -I. -I/usr/include/ruby-1.9.1/powerpc-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Wall  -o cellminer.o -c cellminer.c
gcc -I. -I/usr/include/ruby-1.9.1/powerpc-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Wall  -o spu_miner.o -c spu_miner.c
make -C spu
make[2]: Entering directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext/spu'
Makefile:55: depend.auto: No such file or directory
make[2]: Leaving directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext/spu'
make[2]: Entering directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext/spu'
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o main.o main.c
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o worker.o worker.c
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o sha256.o sha256.c
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o util.o util.c
spu-gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mno-safe-hints -Wall -Werror    -c -o spu_slih.o spu_slih.c
spu-as   -o spu_flih.o spu_flih.s
spu-gcc -o worker.elf  main.o worker.o sha256.o util.o spu_slih.o spu_flih.o
make[2]: Leaving directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext/spu'
embedspu spu_worker spu/worker.elf spu_worker.o
gcc -I. -I/usr/include/ruby-1.9.1/powerpc-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Wall  -o ppu_miner.o -c ppu_miner.c
make -C ppu
make[2]: Entering directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext/ppu'
Makefile:51: depend.auto: No such file or directory
make[2]: Leaving directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext/ppu'
make[2]: Entering directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext/ppu'
gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mcpu=cell  -Wall -Werror    -c -o worker.o worker.c
gcc -DUNROLL_SHA256 -Dinline="inline __attribute__((always_inline))" -O3 -fno-strict-aliasing -funroll-loops -mcpu=cell  -Wall -Werror    -c -o sha256.o sha256.c
sha256.c: In function 'sha256_search':
sha256.c:664:1: internal compiler error: in trunc_int_for_mode, at explow.c:56
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
make[2]: *** [sha256.o] Error 1
make[2]: Leaving directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext/ppu'
make[1]: *** [ppu/worker.a] Error 2
make[1]: Leaving directory `/home/ps3/Downloads/verement-cellminer-f313a7a/ext'
make: *** [ext/cellminer.so] Error 2

if you can help me thanks!

Looks like you might want to use a different version of gcc. I'm using version 4.4.5 (from the Debian gcc-4.4 package).
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 09/05/2011, 21:28:29 UTC
Hi, i'm trying to compile it but i alway got this error the first time i compile:
Code:
ps3@ps3:~/Downloads/verement-cellminer-68aa80c$ make
cd ext && ruby1.9.1 extconf.rb
checking for spe_context_run() in -lspe2... yes
creating Makefile
/usr/lib/ruby/1.9.1/mkmf.rb:1589:in `gsub!': invalid byte sequence in US-ASCII (ArgumentError)
from /usr/lib/ruby/1.9.1/mkmf.rb:1589:in `block in depend_rules'
from /usr/lib/ruby/1.9.1/mkmf.rb:1588:in `each_line'
from /usr/lib/ruby/1.9.1/mkmf.rb:1588:in `depend_rules'
from /usr/lib/ruby/1.9.1/mkmf.rb:1906:in `create_makefile'
from extconf.rb:29:in `
'
make: *** [ext/Makefile] Error 1

Try the latest version I just pushed to github. Apparently the $LANG setting in your environment can have an effect on the interpretation of source files; I corrected this by setting an explicit encoding which should solve the problem.

Make sure you clean your source tree with "git clean -x -f" before you try again.

Thanks for the report.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 08/05/2011, 22:02:36 UTC
Hey but isnt the posibbility to install linux on PS3 gone for long time ago now? or am i wrong?

Officially, yes, unless you kept your firmware at 3.15 or older.

The Cell architecture is also used on some high-end servers. Anyone have a Cell blade cluster to play with?
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 08/05/2011, 20:28:38 UTC
I've now implemented long polling.

Each SPE does about 3.6 Mhash/s. Using 6 SPEs and 2 PPE threads, current hash rate is about 22.2 Mhash/s.

https://github.com/verement/cellminer
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 05/04/2011, 08:19:11 UTC
I've added an option for using PPE threads in addition to the SPEs, however the results are somewhat underwhelming. The Cell PPE is effectively a dual-core processor, but even with two PPE threads I only see about an extra 500 Khash/s.

There may be some PPE optimizations I'm missing, but otherwise I'm currently maxed at about 21.983 Mhash/s using all six SPEs and two PPE threads.

For those interested, I've put the source code online:

  https://github.com/verement/cellminer

Feedback and donations welcome. (Donations to: 18xDLQsJ94ihhx5YovqAhVY2b9SC5b81h)

Cheers.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 04/04/2011, 02:14:05 UTC
It's not that hard to calculate.
We have 6 SPEs available, each can do one 4*32 bit vector op/clock. clocked at 3.2GHz.
6 * 4 * 3.2G = 76.8GINTOPs

No native bitrotate, no ch()-like opcode, so we need about 6350 ops/bitcoinhash.
76800M / 6350ops/hash = ~ 12.1 Mhash/s

Not THAT bad for a >5 year old design.
About on par with a modern CPU, completely outclassed even by a midrange GPU.
PS3: 12.1Mh/s, ~80W, ~$250
HD5770: 156.8Mh/s, ~110W, ~$130

I liked this analysis, but it turns out to be incorrect. The Cell's SPU does in fact have both a native bit rotate (ROTI) and a Ch()-like opcode (SELB).

Since I'm currently measuring 21.471 Mhash/s with my Cell implementation, I guess you could work backwards and calculate 76800M / 21.471 Mhash/s = ~ 3577ops/hash.

However, I think you're right that it is still outclassed by a midrange GPU.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 03/04/2011, 03:24:07 UTC
So after a round of optimizations I'm measuring 18.8 Mhash/s using just the SPEs. I'm thinking about throwing in an extra thread to use the PPE as well.

Cheers.
Post
Topic
Board CPU/GPU Bitcoin mining hardware
Re: PS3 miner?
by
verement
on 30/03/2011, 19:14:34 UTC
Interestingly, a PS3 miner is just what I've been working on. I wrote it largely to teach myself how to program for the Cell Broadband Engine, but it's been an interesting experience learning about Bitcoin as well.

I don't imagine what I've written is completely well optimized yet, but my current estimate is about 7.5 Mhash/s across all six SPEs. I also don't have a good statistics gathering method yet, so this may not be accurate.

The mining architecture is a Ruby front-end (JSON RPC client) with a custom extension library to run the SPE contexts, and native SPU code for the back-end mining. I couldn't get Bitcoin itself to run on the PS3 because Bitcoin is heavily dependent on the little-endian environment and the PowerPC on the PS3 is big-endian.

I may release the code at some point if there is interest. I'll let you know if I manage to improve on the performance.