BeagleBoard cluster

Warning: Under construction.

This tutorial shows how to create a BeagleBoard cluster. It may work with BeagleBoard-XM without further modifications. The Open Embedded build framework is used to build Beagle Board image, specifically an added layer by Ångström is inherited to simplify image creation.

Requirements
The hardware requirement is setup with at least two (You can test the setup with one Beagle Board) BeagleBoard with Ethernet connection(tested with usb-ethernet adapter). It can be accomplished with instructions on BeagleBoard beginners guides and BeagleBoard main page.

For software, the requirement is any Linux distribution supported by Open-Embedded. All project was done using Fedora 16. Make sure to have enough space on hard disk.

How To
The steps are almost the same for Ångström, but a new layers is added to deal with necessary clustering software.

Step 1
Install dependencies for your distribution, it can be found here.

For Fedora 16, first install group 'Development Tools':

sudo yum groupinstall 'Development Tools'

Update all packages:

sudo yum update

Install Open Embedded dependencies:

sudo yum install python m4 make wget curl ftp cvs subversion tar bzip2 gzip unzip \ python-psyco perl texinfo texi2html diffstat openjade docbook-style-dsssl \ docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel glibc-static \ gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch linuxdoc-tools \ gcc-c++ help2man perl-ExtUtils-MakeMaker tcl-devel gettext ccache chrpath cmake ncurses \ apr

Step 2
Clone Ångström setup scripts:

git clone git://github.com/Angstrom-distribution/setup-scripts.git

Step 3
Add BeagleBoard cluster layer.

Enter source directory(where layers are localized):

cd setup-scripts/sources

Clone BeagleBoard cluster layer:

git clone git://github.com/jonaias/meta-bb-cluster.git

Step 4
Configure, update and build cluster image.

MACHINE=beagleboard ./oebb.sh config beagleboard MACHINE=beagleboard ./oebb.sh update MACHINE=beagleboard ./oebb.sh bitbake bb-cluster-image

After build process (it will take time depending on network and computer specs) a generated image will be available under build/tmp-angstrom_vXXXX_XX-eglibc/deploy/images/beagleboard/.

Transfer generated image to SD card, using the process described in Ångström demo page, under section "How to Unpack and Boot the Demo Image"

After booting BB with sd card, an environment with MPICH2 and GCC is available. This environment, if desired, can be used to compile and execute MPICH2 programs without any host computer.

Step 5
Install C6Run. The steps can be found here

Step 6
To compile an example(found on git repository from step3) using DSP for computation and MPICH2 for communication, the host computer is needed. On host computer, source file critical.c, which contains calculations, is compiled with c6Run(It uses TI C6000 compiler as back end). The main.c file is compiled with GCC cross compiler(also installed in step 5). After compiling both files, they are linked together using GCC linker.

An shell script showing the compilation process can also be found on git repository from step 3.

Step 7
Create a symbolic link.

ln -S /etc/bin/arm-angstrom-linux-gnueabi-mpiexec.hydra /etc/bin/mpiexec.hydra

Step 8
To run example.

mpiexec.hydra -f hosts ./pi_dsp

Bonus
QEMU(Linaro branch) can be used to test generated image:

./qemu-system-arm -M beagle -m 256 -sd /dev/mmcblk0 -serial stdio