• Make Your Own Cluster Computer (Part 2)


    [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=lHmFRlETTcQ” browser_url=”https://www.youtube.com/watch?v=lHmFRlETTcQ”][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-2f88″][vc_column_text]

    65_cluster_comp2_thThis is part two of the series that shows you how to make a cluster computer using Raspberry Pi’s!

    You can watch Part 1 here.

    [/vc_column_text][/vc_tab][vc_tab title=”Parts and Downloads” tab_id=”1402713028-2-39e9a4-2f88″][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

    [/vc_column_text][/vc_tab][vc_tab title=”Code” tab_id=”1402753910272-3-8″][vc_column_text]

    Installing and Configuring Raspbian

    • Follow the software configuration steps shown in this video and burn the image file to an SD card for each computer in your cluster.
    • For each Raspberry Pi in your cluster, insert an imaged SD card, connect them all to the same router or switch, and then connect a power source to each one.

    [tabby title=”Terminal Commands”]

      • Install nmap
        • Sudo apt-get update
        • Sudo apt-get install nmap
      • Get current IP
        • Ifconfig
      • Scan subnet for Pi’s
        • Sudo nmap -sn 192.168.1.*
      • Run test file
        • Mpiexec -n 1 hostname
      • Make test folder and file
        • Mkdir mpi_test
        • Cd mpi_test
        • Nano machinefile
          • 192.168.1.2
          • 192.168.1.3
          • 192.168.1.4
          • 192.168.1.5
        • Mpiexec -f machinefile -n 4 hostname
      • Add keys to all pi’s
        • PI01
          • Ssh-keygen
          • Cd ~
          • Cd .ssh
          • Cp id_rsa.pub pi01
          • Ssh pi@192.168.1.3
        • PI02
          • Ssh-keygen
          • Cd .ssh
          • Cp id_rsa.pub pi02
          • Scp 192.168.1.2:/home/pi/.ssh/pi01 .
          • Cat pi01 >> authorized_keys
          • Exit
        • PI03 (ssh pi@192.168.1.5)
          • Ssh-keygen
          • Cd .ssh
          • Cp id_rsa.pub pi03
          • Scp 192.168.1.2:/home/pi/.ssh/pi01 .
          • Cat pi01 >> authorized_keys
          • Exit
        • PI04
          • Ssh-keygen
          • Cd .ssh
          • Cp id_rsa.pub pi04
          • Scp 192.168.1.2:/home/pi/.ssh/pi01 .
          • Cat pi01 >> authorized_keys
          • Exit
        • PI01
          • Scp 192.168.1.3:/home/pi/.ssh/pi02
          • Cat pi02 >> authorized_keys
      • Run new machinefile
        • Cd ~
        • Nano machinefile
          • 192.168.1.2
        • Mpiexec -f machinefile -n 4 hostname
      • Run Python file
        • mpiexec -n 5 python demo/helloworld.py
        • Mpiexec -f machinefile -n 5 python /home/pi/build/mpi4py/demo/md5_dict_attack.py
      • Download and unzip file
      • Copy to all computers
        • Scp -r python_test 192.168.1.3:/home/pi
        • Mpiexec -f machinefile -n 5 python python_test/md5_attack.py

    [/vc_column_text][/vc_tab][vc_tab title=”Important Links” tab_id=”1402753981900-3-10″][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]

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