My Raspberry Pi has arrived!

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
ZirconiumX
Posts: 1327
Joined: Sun Jul 17, 2011 9:14 am

My Raspberry Pi has arrived!

Post by ZirconiumX » Thu May 31, 2012 7:28 pm

And I can safely tell you that the ARMv6 architecture isn't very suited to computer chess.

The 1Ghz PowerPC G4 iMac using fruit gets around 200knps (which is quite slow)
The 700Mhz ARM Raspberry Pi using fruit gets around 25knps (which is incredibly slow)

To put this into perspective, the equivalent figure taking into account processor speed is 140Knps.

I have even over clocked it to 900Mhz and get around 45 knps.

I compiled cutechess (full thing, libs, gui, etc) and got a record breaking time. (700Mhz)

real 44m42sec

So you'll need a bit of time on your hands.

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.

jdart
Posts: 3816
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: My Raspberry Pi has arrived!

Post by jdart » Fri Jun 01, 2012 2:37 am

It's nice you got hold of one, since they seem to be in scarce supply. Any idea how the performance compares to an ARM-based phone? (45k nps doesn't actually seem too horrible to me, since my computer experience goes back to dawn of the PC era, when no mini- or micro-computers were very fast).

--Jon

Rémi Coulom
Posts: 432
Joined: Mon Apr 24, 2006 6:06 pm
Contact:

Re: My Raspberry Pi has arrived!

Post by Rémi Coulom » Fri Jun 01, 2012 8:55 am

jdart wrote:It's nice you got hold of one, since they seem to be in scarce supply. Any idea how the performance compares to an ARM-based phone? (45k nps doesn't actually seem too horrible to me, since my computer experience goes back to dawn of the PC era, when no mini- or micro-computers were very fast).

--Jon
It is slow. The Crazy Bishop, on a core2 duo laptop does about 2Mnps. About 400knps on an Android Transformer Prime. About 300knps on the iPhone 4. All on one core.

The Crazy Bishop does not use bitboards, so it has very few 64-bit operations (except hash code computation).

Rémi

Daniel Shawul
Posts: 3749
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: My Raspberry Pi has arrived!

Post by Daniel Shawul » Fri Jun 01, 2012 12:12 pm

Mine hits about 200knps on an ARMv7. Scorpio uses a mixed piece list and bitboard approach.
I guess it is bad news for those who planned to use the Raspberry Pi to build a cheap cluster (like Steven here who wanted to use it for perft).

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Re: My Raspberry Pi has arrived!

Post by sje » Fri Jun 01, 2012 12:26 pm

The Raspberry Pi already has several competitors, so perhaps there are now or soon will be better boards for small scale clustering.

vincent
Posts: 31
Joined: Tue Jan 19, 2010 7:38 am
Location: Brittany, France
Contact:

Re: My Raspberry Pi has arrived!

Post by vincent » Sun Jun 03, 2012 8:02 pm

I also received my Raspberry Pi this week and I think it's an important piece of (almost) open source hardware. Like the Arduino before that. But it is quite slow as expected.

Here is perft on my engine:

Code: Select all

$ echo "perft\n" | ./purplehaze
Purple Haze v2.0.3-7-gb38f743

> Perft(1) = 20 (0 secs, inf nps)
Perft(2) = 400 (0 secs, inf nps)
Perft(3) = 8902 (0.02 secs, 445100 nps)
Perft(4) = 197281 (0.43 secs, 458793 nps)
Perft(5) = 4865609 (10.55 secs, 461195 nps)
And by comparison on an Intel Atom N280 @1.66GHz:

Code: Select all

$ echo "perft\n" | ./purplehaze
Purple Haze v2.0.3-7-gb38f743

> Perft(1) = 20 (0 secs, inf nps)
Perft(2) = 400 (0 secs, inf nps)
Perft(3) = 8902 (0 secs, inf nps)
Perft(4) = 197281 (0.1 secs, 1.97281e+06 nps)
Perft(5) = 4865609 (2.3 secs, 2.11548e+06 nps)
And while I'm at it on an Intel Pentium P6100 @2.00GHz:

Code: Select all

$ echo "perft\n" | ./purplehaze
Purple Haze v2.0.3-7-gb38f743

> Perft(1) = 20 (0 secs, inf nps)
Perft(2) = 400 (0 secs, inf nps)
Perft(3) = 8902 (0 secs, inf nps)
Perft(4) = 197281 (0.03 secs, 6.57603e+06 nps)
Perft(5) = 4865609 (0.68 secs, 7.15531e+06 nps)

ZirconiumX
Posts: 1327
Joined: Sun Jul 17, 2011 9:14 am

Re: My Raspberry Pi has arrived!

Post by ZirconiumX » Mon Jun 04, 2012 7:38 am

Have you overclocked yours? Mine is running at 930MHz.

I get about 50KNPS on it, while on a PowerPC (much better architecture) G4 at 1GHz I get 200KNPS.

It must be a birth defect of the ARM ISA. Now I know that all RISC architectures are bad at chess because it requires more instructions to do the same thing as a CISC, which has too many useful instructions (x86, x86-64).

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.

vincent
Posts: 31
Joined: Tue Jan 19, 2010 7:38 am
Location: Brittany, France
Contact:

Re: My Raspberry Pi has arrived!

Post by vincent » Mon Jun 04, 2012 8:10 am

ZirconiumX wrote:Have you overclocked yours? Mine is running at 930MHz.
The perft output I posted is for a Raspberry Pi at 700Mhz.

I measured a power consumption at 3.7W so at least it is power efficient.

On a personal note, I use a netbook with an Intel Atom as my main development computer and the compilation time is quite reasonable. This is not the case with the Raspberry Pi, it is painfully slow. But I already learned a few things on the ARM architecture, for example 'char' are 'unsigned' by default with GCC while they are 'signed' on x86. So it is a good experiment for me.

Dan Andersson
Posts: 442
Joined: Wed Mar 08, 2006 7:54 pm

Re: My Raspberry Pi has arrived!

Post by Dan Andersson » Mon Jun 04, 2012 11:08 am

Performing speed benches on CPUs optimized for power efficiency is bound to be a letdown ;) Even the memory subsystem has been power optimized so it's slow in itself. You'll get much different results on newer designs that are trading a bit of power efficiency for performance on newer silicon processes like the ARM Krait and A15 or even A9 designs. So I very much doubt the ISA is a culprit.

MvH Dan Andersson

Daniel Shawul
Posts: 3749
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: My Raspberry Pi has arrived!

Post by Daniel Shawul » Mon Jun 04, 2012 11:42 am

Note that he is running a perft not regular search.

Post Reply