Pages:
Author

Topic: LTC miner optimizations for PowerPC (Power Mac) and Cell/BE (PlayStation 3) - page 2. (Read 12140 times)

newbie
Activity: 28
Merit: 0
Can you do that for me as i don't see an option there to add data.

cat /proc/cpuinfo gives me

cpu: 7447A, altivec supported
clock: 1066,666 MHz
revision 1.1
bogomips: 73.72
model: PowerBook6,5
L2 cache: 512K unified

I can't measure the power consumption.

Cores: 1

Command line arguments: none

OS: Debian Squeeze ppc

Model: iBook G4 1Ghz

kHash/s: 1,66

miner: Cell/BE optimized cpuminer

Edit: my main system isn't in the list too...
Its a MacBook Pro 6,2 (Mid 2010)
2,53 GHz Intel Core i5 (I5-540M)
2 Cores (4 with HT)
OS: Mac OsX 10.7.2
kHash/s: 11,7
miner: Poolers optimized miner
newbie
Activity: 39
Merit: 0
Now it's about 1.60!!
Thanks. By the way, what is the MHz rating of this iBook? Would it be a good idea to add your benchmark data to the mining-hardware-comparison page?
newbie
Activity: 28
Merit: 0
Omg i just saw it myself... well i'm not surfing the web on the ibook therefore no copy&paste  Wink

thanks let's see what it will do!

Now it's about 1.60!!
newbie
Activity: 39
Merit: 0
Thanks for providing the log. The "gcc: unrecognized option '-03'" error message explains everything. We want -O3 option, written as "minus big-o three" and not "minus zero three" (which means 'O'ptimization level '3'). And because the compiler does not recognize the invalid -03 option, all the optimizations get disabled completely and the performance is totally screwed up. Copy/paste is safer than typing Wink
newbie
Activity: 28
Merit: 0
Hm i did as you told me but got nearly the same result. Now i'm at 0.04kh/s

If it's too complicated/time-consuming for you to look into it i understand as i think nearly nobody has G4 hardware anymore (especially running Debian instead of OsX i think but i lost the Installation CD and it felt boring slow with 10.3  Wink ) but if you are interested i'll keep on testing  Smiley

Here is the Terminal output - maybe it helps.

Code:
user@iBookG4:~$ cd Downloads
user@iBookG4:~/Downloads$ ls
cgminer-2.0.6          cgminer-2.0.7          libspe2-2_2.2.80-95-1_powerpc.deb
cgminer-2.0.6.tar.bz2  cgminer-2.0.7.tar.bz2  pooler
user@iBookG4:~/Downloads$ git clone git://github.com/ssvb/cpuminer.git
Cloning into cpuminer...
remote: Counting objects: 741, done.
remote: Compressing objects: 100% (337/337), done.
remote: Total 741 (delta 475), reused 646 (delta 400)
Receiving objects: 100% (741/741), 199.86 KiB | 326 KiB/s, done.
Resolving deltas: 100% (475/475), done.
user@iBookG4:~/Downloads$ cd cpuminer
user@iBookG4:~/Downloads/cpuminer$ ls
AUTHORS       COPYING           miner.h            scrypt-cell-spu.h
autogen.sh    cpu-miner.c       mknsis.sh          scrypt-simd-helpers.h
ChangeLog     elist.h           NEWS               sha256-helpers.h
compat        example-cfg.json  README             util.c
compat.h      LICENSE           scrypt.c
configure.ac  Makefile.am       scrypt-cell-spu.c
user@iBookG4:~/Downloads/cpuminer$ export CFLAGS="-03 -mcpu=G4 -maltivec -fstrict-aliasing"
user@iBookG4:~/Downloads/cpuminer$ ./autogen.sh && ./configure && make
configure.ac:15: installing `./compile'
configure.ac:4: installing `./config.guess'
configure.ac:4: installing `./config.sub'
configure.ac:6: installing `./install-sh'
configure.ac:6: installing `./missing'
compat/jansson/Makefile.am: installing `./depcomp'
Makefile.am: installing `./INSTALL'
checking build system type... powerpc-unknown-linux-gnu
checking host system type... powerpc-unknown-linux-gnu
checking target system type... powerpc-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking whether gcc and cc understand -c and -o together... yes
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for spe_context_create in -lspe2... no
checking for spu-elf-gcc... no
checking for spu-gcc... spu-gcc
checking for embedspu... embedspu
checking for json_loads in -ljansson... no
checking for pthread_create in -lpthread... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gawk... (cached) gawk
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.21.0
checking for libcurl >= version 7.10.1... yes
checking whether libcurl is usable... yes
checking for curl_free... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compat/Makefile
config.status: creating compat/jansson/Makefile
config.status: creating cpuminer-config.h
config.status: executing depfiles commands
make  all-recursive
make[1]: Entering directory `/home/user/Downloads/cpuminer'
Making all in compat
make[2]: Entering directory `/home/user/Downloads/cpuminer/compat'
Making all in jansson
make[3]: Entering directory `/home/user/Downloads/cpuminer/compat/jansson'
gcc -DHAVE_CONFIG_H -I. -I../..     -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT dump.o -MD -MP -MF .deps/dump.Tpo -c -o dump.o dump.c
gcc: unrecognized option '-03'
mv -f .deps/dump.Tpo .deps/dump.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT hashtable.o -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.o hashtable.c
gcc: unrecognized option '-03'
mv -f .deps/hashtable.Tpo .deps/hashtable.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT load.o -MD -MP -MF .deps/load.Tpo -c -o load.o load.c
gcc: unrecognized option '-03'
mv -f .deps/load.Tpo .deps/load.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT strbuffer.o -MD -MP -MF .deps/strbuffer.Tpo -c -o strbuffer.o strbuffer.c
gcc: unrecognized option '-03'
mv -f .deps/strbuffer.Tpo .deps/strbuffer.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT utf.o -MD -MP -MF .deps/utf.Tpo -c -o utf.o utf.c
gcc: unrecognized option '-03'
mv -f .deps/utf.Tpo .deps/utf.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT value.o -MD -MP -MF .deps/value.Tpo -c -o value.o value.c
gcc: unrecognized option '-03'
mv -f .deps/value.Tpo .deps/value.Po
rm -f libjansson.a
ar cru libjansson.a dump.o hashtable.o load.o strbuffer.o utf.o value.o
ranlib libjansson.a
make[3]: Leaving directory `/home/user/Downloads/cpuminer/compat/jansson'
make[3]: Entering directory `/home/user/Downloads/cpuminer/compat'
make[3]: Für das Ziel »all-am« ist nichts zu tun.
make[3]: Leaving directory `/home/user/Downloads/cpuminer/compat'
make[2]: Leaving directory `/home/user/Downloads/cpuminer/compat'
make[2]: Entering directory `/home/user/Downloads/cpuminer'
gcc -DHAVE_CONFIG_H -I. -pthread -I./compat/jansson    -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT minerd-cpu-miner.o -MD -MP -MF .deps/minerd-cpu-miner.Tpo -c -o minerd-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c
gcc: unrecognized option '-03'
mv -f .deps/minerd-cpu-miner.Tpo .deps/minerd-cpu-miner.Po
gcc -DHAVE_CONFIG_H -I. -pthread -I./compat/jansson    -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT minerd-util.o -MD -MP -MF .deps/minerd-util.Tpo -c -o minerd-util.o `test -f 'util.c' || echo './'`util.c
gcc: unrecognized option '-03'
mv -f .deps/minerd-util.Tpo .deps/minerd-util.Po
gcc -DHAVE_CONFIG_H -I. -pthread -I./compat/jansson    -03 -mcpu=G4 -maltivec -fstrict-aliasing -MT minerd-scrypt.o -MD -MP -MF .deps/minerd-scrypt.Tpo -c -o minerd-scrypt.o `test -f 'scrypt.c' || echo './'`scrypt.c
gcc: unrecognized option '-03'
mv -f .deps/minerd-scrypt.Tpo .deps/minerd-scrypt.Po
gcc  -03 -mcpu=G4 -maltivec -fstrict-aliasing -pthread  -o minerd minerd-cpu-miner.o minerd-util.o minerd-scrypt.o -lcurl compat/jansson/libjansson.a -lpthread 
gcc: unrecognized option '-03'
make[2]: Leaving directory `/home/user/Downloads/cpuminer'
make[1]: Leaving directory `/home/user/Downloads/cpuminer'
user@iBookG4:~/Downloads/cpuminer$ ls
aclocal.m4      config.sub            install-sh          mknsis.sh
AUTHORS         configure             LICENSE             NEWS
autogen.sh      configure.ac          Makefile            README
autom4te.cache  COPYING               Makefile.am         scrypt.c
ChangeLog       cpu-miner.c           Makefile.in         scrypt-cell-spu.c
compat          cpuminer-config.h     minerd              scrypt-cell-spu.h
compat.h        cpuminer-config.h.in  minerd-cpu-miner.o  scrypt-simd-helpers.h
compile         depcomp               minerd-scrypt.o     sha256-helpers.h
config.guess    elist.h               minerd-util.o       stamp-h1
config.log      example-cfg.json      miner.h             util.c
config.status   INSTALL               missing
user@iBookG4:~/Downloads/cpuminer$ ./minerd --userpass meti.2:2 --url http://litecoinpool.org:9332 --algo scrypt
[2012-01-02 19:17:27] Binding thread 0 to cpu 0
[2012-01-02 19:17:27] Long-polling activated for http://litecoinpool.org:9332/LP
[2012-01-02 19:17:28] 1 miner threads started, using SHA256 'scrypt' algorithm.
[2012-01-02 19:17:31] LONGPOLL detected new block
[2012-01-02 19:17:31] thread 0: 144 hashes, 0.04 khash/sec
[2012-01-02 19:18:00] LONGPOLL detected new block
[2012-01-02 19:18:00] thread 0: 1306 hashes, 0.04 khash/sec
[2012-01-02 19:18:11] LONGPOLL detected new block
[2012-01-02 19:18:12] thread 0: 488 hashes, 0.04 khash/sec
[2012-01-02 19:19:12] thread 0: 2651 hashes, 0.04 khash/sec
[2012-01-02 19:20:12] thread 0: 2661 hashes, 0.04 khash/sec
[2012-01-02 19:21:16] thread 0: 2659 hashes, 0.04 khash/sec



Thanks for the quick reply btw!
newbie
Activity: 39
Merit: 0
As i read this today i started to try it out on my old iBook G4 running Debian.
Thanks for posting your feedback, you are welcome here.

Quote
I got only 0.02 kh/s with your version.
For poolers miner i got somewhere at 0.7
This looks really strange. Even without the use of Altivec (SIMD instructions on PowerPC), the results should be maybe at most 20-30% slower than pooler's. But with the use of Altivec it should be several times faster.

Quote
As i'm not familiar to what the cflags do could you please help me figure out what to do?
You can try something like this:
Code:
$ git clone git://github.com/ssvb/cpuminer.git
$ cd cpuminer
$ export CFLAGS="-O3 -mcpu=G4 -maltivec -fstrict-aliasing"
$ ./autogen.sh && ./configure && make

The -mcpu and -maltivec options are needed to enable PowerPC specific optimizations for your processor. Otherwise it just runs a slow C implementation.
newbie
Activity: 28
Merit: 0
Hi!

As i read this today i started to try it out on my old iBook G4 running Debian.

I got only 0.02 kh/s with your version.
For poolers miner i got somewhere at 0.7

As i'm not familiar to what the cflags do could you please help me figure out what to do?
legendary
Activity: 1190
Merit: 1000
www.bitcointrading.com
Intel Core i7 860 computer, which is able to do at least 25 khash/s.
Ahh see this is where I failed, and I'm glad I came to realize it before I wasted too much more time.  I had tried getting the miner to work outside of the litecoinpool browser miner and after a few failed attempts, I gave up.  I guess it was just a bit of wasted electricity mining with the browser.  I'm just going to buy LTC's, let you guys mine them.
Still I would prefer to keep discussion focused on mining using PowerPC and PlaySatation3 hardware in this topic Wink
Agreed, sorry about the lite-threadbomb.  Definitely going to be keeping an eye on this one, I'm excited to see high numbers with the Cell processor.  There's a lot of PS3 clusters out there, and although it might not be profitable to run them today, in the future you might be able to pick them up for cheap and put them to work.
legendary
Activity: 1204
Merit: 1000
฿itcoin: Currency of Resistance!
hero member
Activity: 633
Merit: 500
Do you think it would be possible to do a tutorial from start to finish for YouTube?
newbie
Activity: 39
Merit: 0
Wow I was discouraged by the 3 kh/s my i7 can do,
Nowadays i7 is also not so bad at LTC mining thanks to the SSE2 optimizations done by pooler. BTW, I have bought some cheap power meter and added the data about my hardware to the Mining hardware comparison wiki page. This also includes my Intel Core i7 860 computer, which is able to do at least 25 khash/s. Still I would prefer to keep discussion focused on mining using PowerPC and PlaySatation3 hardware in this topic Wink

Quote
if we can pump up some real numbers, I think Litecoin has a future!  I just bought nearly 2000 LTC's for 2 BTC's on BTC-E, we'll see if I look back at this post in a years' time and if that was a good decision.
If everyone uses the best optimizations in miners, then you don't have any real advantage over the others. But it's good when the force is in balance Smiley This prevents the scenario when some bad guy keeps an optimized miner for himself and uses it together with some botnet for an extra advantage when attacking the network.
legendary
Activity: 1190
Merit: 1000
www.bitcointrading.com
Wow I was discouraged by the 3 kh/s my i7 can do, if we can pump up some real numbers, I think Litecoin has a future!  I just bought nearly 2000 LTC's for 2 BTC's on BTC-E, we'll see if I look back at this post in a years' time and if that was a good decision.
newbie
Activity: 39
Merit: 0
PS3 mines at 34khps?  That's quite a deal.  If there's an easy way to install the miner onto the PS3, there may be millions of new users out there.
The Cell/BE optimized miner requires Linux installation running on PS3, which was initially marketed by Sony as OtherOS feature. This feature was discontinued in newer PS3 Slim models and also removed from older PS3 consoles by firmware update despite the original promise to keep it. The users were given a free choice how to cripple their PS3 functionality: forfeit OtherOS or lose the ability to play new games. I myself opted for the latter option. I guess the majority of normal users interested in games made a different choice and there are hardly millions of new users to do LTC mining on PS3 as a result.

Also another side of this story is that such controversial actions from Sony encouraged a lot of hackers to break PS3 protection and recover OtherOS and even enable OtherOS on PS3 Slim at some point by using modified firmware. That's a cat and mouse game between Sony and hackers, but I'm not really tracking the news from this front. After all, my PS3 still has OtherOS supported via an old version of the official firmware. Still on a technical side, the miner should also work fine with the OtherOS from unofficial modified firmware variants developed by hackers.
hero member
Activity: 633
Merit: 500
During the Christmas holidays I spent some time trying to figure out if PlayStation 3 is any good for Scrypt proof of work used by litecoin. As a result, LTC mining performance went up from ~1 khash/s to something like ~34 khash/s. My patches for jgarzik/ArtForz cpuminer are available at GitHub: https://github.com/ssvb/cpuminer

Everything should build fine in Linux using the standard "./autogen.sh && ./configure && make" steps (the availability of libspe2 library and spu-elf-gcc/embedspu tools should be detected automatically by configure). Setting CFLAGS to the optimal settings "-O3 -mcpu=cell -mtune=cell -maltivec -fstrict-aliasing" before compilation provides best performance. Note: this miner requires linux to run on PS3. If you don't have linux, you can't use it.

Also these optimizations should improve performance on many other PowerPC hardware by using Altivec instructions. If everything goes well, the PowerPC optimizations may be potentially merged with pooler's miner in the future.

If you find any bugs, please let me know. And sorry for a short announcement, I'll try to add more information later.

PS3 mines at 34khps?  That's quite a deal.  If there's an easy way to install the miner onto the PS3, there may be millions of new users out there.
newbie
Activity: 39
Merit: 0
During the Christmas holidays I spent some time trying to figure out if PlayStation 3 is any good for Scrypt proof of work used by litecoin. As a result, LTC mining performance went up from ~1 khash/s to something like ~34 khash/s. My patches for jgarzik/ArtForz cpuminer are available at GitHub: https://github.com/ssvb/cpuminer

Everything should build fine in Linux using the standard "./autogen.sh && ./configure && make" steps (the availability of libspe2 library and spu-elf-gcc/embedspu tools should be detected automatically by configure). Setting CFLAGS to the optimal settings "-O3 -mcpu=cell -mtune=cell -maltivec -fstrict-aliasing" before compilation provides best performance. Note: this miner requires linux to run on PS3. If you don't have linux, you can't use it.

Also these optimizations should improve performance on many other PowerPC hardware by using Altivec instructions. If everything goes well, the PowerPC optimizations may be potentially merged with pooler's miner in the future.

If you find any bugs, please let me know. And sorry for a short announcement, I'll try to add more information later.
Pages:
Jump to: