[vc_row][vc_column width=”2/3″][vc_separator][venera_framed_image content_type=”video” css_animation=”appear” frame_type=”browser” slider_engine=”flexslider” video_link=”https://www.youtube.com/watch?v=1R0UgIgcb5g” browser_url=”https://www.youtube.com/watch?v=1R0UgIgcb5g”][vc_separator][/vc_column][vc_column width=”1/3″][/vc_column][/vc_row][vc_row][vc_column width=”2/3″][vc_tabs][vc_tab title=”About This Project” tab_id=”1402713028-1-39e9a4-2f886e2a-7d43″][vc_column_text]
Learn how to make a cluster computer using Raspberry Pi’s! You can also use this method to build your own super computer.
[/vc_column_text][/vc_tab][vc_tab title=”Parts and Downloads” tab_id=”1402713028-2-39e9a4-2f886e2a-7d43″][vc_column_text]
- 2 or more Raspberry Pi’s
- SD cards for each Pi
- Power Cables for each Pi
- Powered USB Hub (optional)
- Networking Cables
- A Hub or a Router
TOTAL COST: ~$100.00 [tabby title=”Software”]
[/vc_column_text][/vc_tab][vc_tab title=”Code” tab_id=”1402753910272-3-86e2a-7d43″][vc_column_text]
- Download the Raspbian Image from here.
- Burn the Raspbian Image to your SD Card
- If you have Windows, you can follow these instructions.
- If you have a Mac, you can follow these instructions.
- Once the image is burned to your SD Card, but it into the Raspberry Pi and boot it up with a Keyboard, Mouse, Monitor and Internet attached.
- Upon first boot, you should see the Rasbperry Pi Configuration screen (otherwise type “
sudo raspbi-config
“. Here’s the options we’ll need to configure- Expand the File System
- If needed, set the Internationalization options to match your countries keyboard layout.
- Overlcock the Pi to 800 Mhz
- Advanced Options
- Set the Hostname to Pi01
- Split the memory to 16mb for graphics
- Enable SSH
- Finish out of the configuration, but don’t reboot yet
- To enable auto-login, at the terminal command type “
sudo nano /etc/inittab
”- Comment out this line:
#1:2345:respawn:/sbin/getty --noclear 38400 tty1
- And add this line right beneath it:
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
- Comment out this line:
- Now you can reboot your Pi and it should auto-login
[tabby title=”Terminal Commands”]
Installing MPICH
- MPICH is software that allows for multi-processing communication between computers.
- To install it on your Raspberry Pi, first make sure you have a valid Internet connection going to the Pi. Then follow these Terminal Commands
-
sudo apt-get update
-
mkdir mpich2
-
cd ~/mpich2
-
wget http://www.mpich.org/static/downloads/3.1/mpich-3.1.tar.gz
-
tar xfz mpich-3.1.tar.gz
-
sudo mkdir /home/rpimpi/
-
sudo mkdir /home/rpimpi/mpi-install
-
mkdir /home/pi/mpi-build
-
cd /home/pi/mpi-build
-
sudo apt-get install gfortran
-
sudo /home/pi/mpich2/mpich-3.1/configure -prefix=/home/rpimpi/mpi-install
-
sudo make
-
sudo make install
-
nano .bashrc
-
PATH=$PATH:/home/rpimpi/mpi-install/bin
-
-
sudo reboot
-
mpiexec -n 1 hostname
-
- These commands will download and install MPICH, as well as add it as a path to your BASHRC boot file. The last command runs a test to see if it works. If the last command returns “Pi01”, then you did everything successfully.
Installing MPI4PY
- As it is, MPICH can run C and Fortran programs. But since the Raspberry Pi has the Python coding environment pre-installed, it would be easiest to install a Python to MPI interpreter. Here’s the commands to do that:
-
sudo aptitude install python-dev
-
wget https://mpi4py.googlecode.com/files/mpi4py-1.3.1.tar.gz
-
tar -zxf mpi4py-1.3.1
-
cd mpi4py-1.3.1
-
python setup.py build
-
python setup.py install
-
export PYTHONPATH=/home/pi/mpi4py-1.3.1
-
mpiexec -n 5 python demo/helloworld.py
-
[/vc_column_text][/vc_tab][vc_tab title=”Important Links” tab_id=”1402753981900-3-106e2a-7d43″][vc_column_text] Help support my channel: http://www.patreon.com/tinkernut Follow Tinkernut! Google + Facebook Twitter [/vc_column_text][/vc_tab][/vc_tabs][/vc_column][vc_column width=”1/3″][/vc_column][/vc_row]