Make Your Own Cluster Computer


[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]

Acquiring the Parts
Here’s what you will need:

  1. 2 or more Raspberry Pi’s
  2. SD cards for each Pi
  3. Power Cables for each Pi
  4. Powered USB Hub (optional)
  5. Networking Cables
  6. 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]

Installing and Configuring Raspbian

  • Download the Raspbian Image from here.
  • Burn the Raspbian Image to your SD Card
  • 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
      • 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:

[/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]

4 Responses


  • b8con // //

    I’ve been doing great on this until I did the “sudo make install” where I received the following error.

    src/binding/f77/.deps/spawnmultf.Plo:125: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.

    Any thoughts?

    Sal

    • TheNH813 // //

      That appears to be a bug in the code. Likely it’s fixed since you made this comment.

  • sageofhalo // //

    Greetings! I realize this is an old project but I was hoping you could help me. I decided I’d try this cluster out as I had a few old Pi’s laying around. I made it all the way through the MPICH2 install with no issues but when I attempt the command “python setup.py build” it fails with the following – “error: Cannot find ‘mpi.h’ header. Check your configuration!!!

    Up to that point everything went perfectly.

    Can you be of any assistance? Thanks in advance.

  • danielcolgrave // //

    hey mate thanks for the build, i have 1 problem tho… the ” wget https://mpi4py.googlecode.com/files/mpi4py-1.3.1.tar.gz ” Link is no longer active, are you able to update this for us please, really looking forword to finishing this asap 🙂 thanks again for the awsome build

Leave a Reply