Experimentation with the quad core Raspberry Pi

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Experimentation with the quad core Raspberry Pi

Post by sje » Wed Jul 08, 2015 1:25 pm

Experimentation with the new quad core Raspberry Pi

As mentioned before, there is a new, 900 MHz quad-core ARM Cortex-A7, 1 GiB RAM version of the Raspberry Pi single board computer.

Image
https://en.wikipedia.org/wiki/Raspberry_Pi

To get an idea how a distributed, multithreaded chess application might run on the above, I ordered two of them for experiments. I'll be porting both Symbolic and Oscar for a start. Because Oscar is single threaded, there will be four separate instance running, one per core.

I expect Oscar to run fairly well as it's designed for a small memory, 32 bit host.

More when the boards arrive.

Joost Buijs
Posts: 1230
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: Experimentation with the quad core Raspberry Pi

Post by Joost Buijs » Wed Jul 08, 2015 7:23 pm

sje wrote:Experimentation with the new quad core Raspberry Pi

As mentioned before, there is a new, 900 MHz quad-core ARM Cortex-A7, 1 GiB RAM version of the Raspberry Pi single board computer.

Image
https://en.wikipedia.org/wiki/Raspberry_Pi

To get an idea how a distributed, multithreaded chess application might run on the above, I ordered two of them for experiments. I'll be porting both Symbolic and Oscar for a start. Because Oscar is single threaded, there will be four separate instance running, one per core.

I expect Oscar to run fairly well as it's designed for a small memory, 32 bit host.

More when the boards arrive.
A couple of months ago I bought 2 of these, they are indeed a lot faster than the old RPI. When you make use of all 4 cores the difference is something like a factor 6.
I tried to run my engine on it (under Windows 10, which is available for it) this because I didn't want to make changes to my threading code.
It does almost 1 million n/s which is not bad for such a small device.
It is a pity that the device isn't 64 bit though, I had to make some modifications to my engine to get it running, it was at least 10 years ago that I used a 32 bit processor.

It is a nice device when you consider the low price (37 euro in my country) but I would have liked it a lot more when they had put a 64 bit ARM on it.

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

Re: Experimentation with the quad core Raspberry Pi

Post by sje » Wed Jul 08, 2015 9:02 pm

Joost Buijs wrote:A couple of months ago I bought 2 of these, they are indeed a lot faster than the old RPI. When you make use of all 4 cores the difference is something like a factor 6.
I tried to run my engine on it (under Windows 10, which is available for it) this because I didn't want to make changes to my threading code.
It does almost 1 million n/s which is not bad for such a small device.
It is a pity that the device isn't 64 bit though, I had to make some modifications to my engine to get it running, it was at least 10 years ago that I used a 32 bit processor.
To help locate bugs, particularly portability bugs, I regularly compile and run Symbolic and Oscar on 32 bit hardware (Intel, AMD, PowerPC, ARM). This is of considerable help with detecting hidden dependencies. I can also compile and run Oscar on an old Macintosh with a Motorola 680x0 CPU, although I haven't done this recently.

The Raspberry Pi boards should arrive in a few days. I need to get a couple of 16 GiB SD cards for file storage; the included 4 GiB cards just don't have enough free space.

mvk
Posts: 589
Joined: Tue Jun 04, 2013 8:15 pm

Re: Experimentation with the quad core Raspberry Pi

Post by mvk » Wed Jul 08, 2015 9:19 pm

sje wrote:The Raspberry Pi boards should arrive in a few days. I need to get a couple of 16 GiB SD cards for file storage; the included 4 GiB cards just don't have enough free space.
The 4GB cards are too tight for many applications. I got a pi1 running Bliep(C) on FICS on such a card. It barely fits, including logging and 5 piece Syzygy WDL and DTZ (using lossy DTZ compression in fact). What I did was free up a lot of space by flushing a lot of cruft and deleting Mathematica. Here is my procedure:

Code: Select all

sudo update-rc.d -f dphys-swapfile remove
sudo apt-get purge -y dphys-swapfile
sudo apt-get purge wolfram-engine
sudo apt-get install localepurge
sudo localepurge
sudo apt-get install deborphan 
sudo apt-get remove --purge `deborphan --guess-all`
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get clean
sudo sync
sudo shutdown -r now
This might help put some 4GB cards to use.
[Account deleted]

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

Re: Experimentation with the quad core Raspberry Pi

Post by sje » Fri Jul 10, 2015 5:19 pm

I received my two Raspberry Pi quad core boards today along with a pair of 4 GiB SD cards pre-loaded with Debian Linux.

Before applying any updates (12+ MiB delta) or copying any user files, there is only 359 MiB free space on the SD card. I'm not going to bother fiddling with the 4 GiB SD cards; instead I'll save much time and trouble by getting some 16 GiB cards.

At present, apt-get update seems to be nearly stalled on grabbing a 229 MiB chunk of Mathematica. The Ethernet status LED is pulsing and top shows a whole thread running the update but it is very slow. The data transfer rate is only about 20 KiB/second.

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

7.37x speed-up

Post by sje » Fri Jul 10, 2015 5:59 pm

The update is still messed up, but I was able to port Symbolic and run a benchmark.

The new quad core Raspberry Pi runs Symbolic at about 7.37 times as fast as the old single core Raspberry Pi.

That's about 5% faster than my 2006 3.0 GHz Pentium 4 machine. The Pentium 4 machine is too slow for running perft() calculations because of its electricity cost.

bob
Posts: 20922
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: 7.37x speed-up

Post by bob » Fri Jul 10, 2015 9:55 pm

sje wrote:The update is still messed up, but I was able to port Symbolic and run a benchmark.

The new quad core Raspberry Pi runs Symbolic at about 7.37 times as fast as the old single core Raspberry Pi.

That's about 5% faster than my 2006 3.0 GHz Pentium 4 machine. The Pentium 4 machine is too slow for running perft() calculations because of its electricity cost.
"slow" is but one of many adjectives that apply to that particular processor. "shitty". "poorly designed". "crappy L1 cache performance". Net burst sucks. Etc. :)

I have one and I refuse to even plug it in due to the small residual power it eats. That was Intel's darkest hour.

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

Re: 7.37x speed-up

Post by sje » Sat Jul 11, 2015 2:17 am

bob wrote:I have one and I refuse to even plug it in due to the small residual power it eats. That was Intel's darkest hour.
In my defense, I did not know when I bought one that the Pentium 4 was such an awful piece of crap. Its too-long pipelines provided high clock speeds to satisfy Intel's marketing guys while screwing everybody else.

Mine came inside a Compaq mini-tower; I had improperly assumed that the brand name might have meant something. It gets switched on a couple times a month for back-ups and to help test Symbolic's build/execute compatibility with 32 bit Intel CPUs. The box has a weird power problem in where it will not cold boot unless it has been unplugged for about a minute to let the power supply capacitors discharge. And under Debian 8, it will no longer power off by itself in response to a halt command.

flok

cluster

Post by flok » Sat Jul 11, 2015 9:26 pm

A year (or two?) ago I had created a cluster of 7 raspberry pies. The one with 512MB ram. They would all run a different chess-program. Those programs then were talked to by PuppetMaster which would ask them what move they would do for a certain position. The most chosen move was selected.
This year I replaced those 7 rpis by 2 rpi2s: that's 8 cores so this time not 7 but 8 engines. It actually played better than the 7 individual pies.
It has played at the CSVN tournament under the name PuppetMaster.

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

Re: Experimentation with the quad core Raspberry Pi

Post by sje » Mon Jul 13, 2015 2:35 am

For my two new Pi2s, I got a pair of 16 GB micro SD cards, each with a supposed 48 MBps transfer rate. There's just too much work involved loading up Linux and my own environment to waste time with 4 GB cards with too little room to spare. Indeed, I almost spent more to get the 32 GB cards but managed to resist the temptation.

I got a copy of the latest Raspian distribution (2015-05-05, I think) as a starting point. I spent more than two hours chasing down and fixing a bug where the boot init sequence was assigning a DHCP IP address to an interface (eth0) clearly marked in /etc/network/interfaces as NOT using DHCP and having a manual (static) IP address assigned. This was something that should have been caught had the distribution ever been really tested.

I've had a lot of problems with Debian 8.0/8.1 as well. On an Atom CPU notebook, it activated the sleep after 20 seconds NO MATTER WHAT. Even the live distribution, run from a USB stick, had the same problem. On some 64 bit Intel/AMD CPUs there were serious WiFi stability issues causing random failures where no such failures were to be seen with Debian 7.8. Reverting the machinery to 7.8 has been eating a lot of time and causing no small amount of irritation. Something has gone wrong with Debian Q/A and I hope they fix it soon.

Anyway, I've been spending too much time messing with these problems to get any coding done. And I haven't yet attacked the WiFi adapter issue with the new Pi2s. Plus my 20 pound Oscar Cat, angry at me for spending too much time with the machines instead of with him, jumped on my HP 64 bit notebook and then leaped off with his left rear paw ripping off the "W" key, now nowhere to be found.

Post Reply