Upload
gustavo-luis-condoy-pogo
View
219
Download
0
Embed Size (px)
Citation preview
8/17/2019 Make Cluster Computer Part 1
1/12
pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
PART 1
NAVIGATION
search this Bag - 0
http://www.tinkernut.com/http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://www.tinkernut.com/2014/05/make-cluster-computer-part-2/http://www.tinkernut.com/
8/17/2019 Make Cluster Computer Part 1
2/12
pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
MAKE YOUR OWN CLUSTER COMPUTER(PART 2)
[vc_row][vc_column
wi dth =”2 /3 ″][v c_sepa ra tor][v enera_fra med_im ag e
content_ty pe=”v ideo” css_anim ation=”appear”
frame_ty pe=”browser” slider_engine=” flexslider” v ideo_link =”h tt ps://w ww .y outube.com /wat ch ?
v =lHm FRlETTcQ”
browser _url=”h tt ps://w ww. y outube.com/w at ch ?
v =lHm FRlETTcQ”][v c_sepa rat or][/v c_column][v c_colum n
wi dth =”1 /3 ″][/v c_colum n][/v c_r ow][v c_r ow][v c_colum n
wi dth =”2 /3 ″][v c_t abs][v c_t ab ti tle=”A bout Th is Projec t”
tab_id=”1402713028-1-39e9a4-2f88″][vc_column_text]
This is parttw o of the
series that
shows you
how to make
a cluster
computer
using
Raspberry
Pi’s!
You can
wa tch Part 1 here.
[/vc_column_text][/vc_tab][v c_tab title=”Parts and
Downloads” tab_id=”14 027 1 3028-2-39e9a4 -
2f88″][vc_column_text]
9may
v iew
http://www.tinkernut.com/2014/05/make-cluster-computer-part-2/http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://www.tinkernut.com/2014/05/make-cluster-computer-part-2/http://www.tinkernut.com/2014/04/27/make-cluster-computer/http://www.tinkernut.com/2014/05/make-cluster-computer-part-2/http://www.tinkernut.com/wp-content/uploads/2014/05/365_cluster_comp2_th.gif
8/17/2019 Make Cluster Computer Part 1
3/12
pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
Acquiring the Part s
Here’s what y ou w ill need:
1 . 2 or more Raspberry Pi’s
2. SD cards for each Pi
3. Power Cables for ea ch Pi
4. Power ed USB Hub (optional)
5. Networking Cables
6. A Hub or a Router
TOTAL COST: ~$1 00.00
[/vc_column_text][/vc_tab][vc_tab title=”Code”
tab_id=”1402753910272-3-8″][vc_column_text]
Installing and Configuring Raspbian
Follow the softwa re configurat ion steps shown in this video
and burn the im age file to an SD card for each computer in
y our clu ster .
For each Raspberry Pi in y our cluster, insert an imag ed SD
card, connect them all to the same r outer or switch, an d
then connect a power source to each one.
[tabby title=”Terminal Comm ands”]
Install nm ap
Sudo apt-get update
Sudo apt-get install nm ap
Get current IP
Ifconfig
Scan subnet for Pi’s
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://goo.gl/8doKXphttp://goo.gl/6kelAahttp://goo.gl/Zozwk9http://goo.gl/Pe6oNlhttp://goo.gl/P540y1http://goo.gl/srXHvmhttp://www.tinkernut.com/2014/04/27/make-cluster-computer/
8/17/2019 Make Cluster Computer Part 1
4/12
pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
Sudo nmap -sn 192.1 68.1 .*
Run test file
Mpiexec -n 1 hostnam e
Make test folder a nd file
Mkdir mpi_test
Cd mpi_test
Nano machin efile
192.168.1.2
192.168.1.3
192.168.1.4
192.168.1.5
Mpiexec -f machinefile -n 4 hostname
Add key s to al l pi’s
PI01
Ssh-key gen
Cd ~
Cd .ssh
Cp id_rsa.pub pi01
Ssh [email protected] 68.1.3
PI02
Ssh-key genCd .ssh
Cp id_rsa.pub pi02
Scp 19 2.1 68.1 .2:/home/pi/.ssh/pi01 .
Cat pi01 >> authorized_keys
Exit
PI03 (ssh pi@192 .1 68.1 .5)
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
8/17/2019 Make Cluster Computer Part 1
5/12
pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
Ssh-key gen
Cd .ssh
Cp id_rsa.pub pi03
Scp 19 2.1 68.1 .2:/home/pi/.ssh/pi01 .
Cat pi01 >> authorized_keys
Exit
PI04
Ssh-key gen
Cd .ssh
Cp id_rsa.pub pi04
Scp 19 2.1 68.1 .2:/home/pi/.ssh/pi01 .
Cat pi01 >> authorized_keys
Exit
PI01
Scp 192.168.1.3:/home/pi/.ssh/pi02
Cat pi02 >> a uth orized_key s
Run new machinefile
Cd ~
Nano machin efile
192.168.1.2
Mpiexec -f machinefile -n 4 hostname
Run Pyth on file
mpiex ec -n 5 py thon demo/helloworld.py
Mpiexec -f machinefile -n 5 python
/home/pi/build/mpi4py/demo/md5_dict_attack. p
Down load and un zip file
Wget
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
8/17/2019 Make Cluster Computer Part 1
6/12
pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
http://www.tinkernut.com/demos/364_cluster_co
Tar -zxf pyth on_test.tar.g z
Nano py thon_test/md5_att ack.py
Change hash
Copy to all comput ers
Scp -r python_test 19 2.1 68.1 .3:/home/pi
Mpiexec -f machinefile -n 5 python
pyt hon_test/md5_att ack.py
[/vc_column_text][/vc_tab][vc_tab title=”Important Links”
tab_id=”1402753981900-3-10″][vc_column_text]
Help support m y chann el:
http://www.patreon.com/tinkernut
Follow Tinkernut!
Google +
[/vc_column_text][/vc_tab][/vc_tabs][/vc_column][vc_col
wi dth =”1 /3 ″][/v c_colum n][/v c_r ow]
Comm ents (6) Read more
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://www.tinkernut.com/demos/364_cluster_comp/python_test.tar.gzhttp://www.patreon.com/tinkernuthttp://goo.gl/1dmi1http://www.facebook.com/tinkernuthttp://www.twitter.com/tinkernuthttp://www.tinkernut.com/2014/05/make-cluster-computer-part-2/#commentshttp://www.tinkernut.com/2014/05/make-cluster-computer-part-2/http://www.tinkernut.com/2014/04/make-cluster-computer/http://www.tinkernut.com/2014/04/make-cluster-computer/
8/17/2019 Make Cluster Computer Part 1
7/12
pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
MAKE YOUR OWN CLUSTER COMPUTER
[vc_row][vc_column
wi dth =”2 /3 ″][v c_sepa ra tor][v enera_fra med_im ag e
content_ty pe=”v ideo” css_anim ation=”appear”
frame_ty pe=”browser” slider_engine=” flexslider”
v ideo_link =”h tt ps://w ww .y outube.com /wat ch ?
v =1 R0UgIgc b5g ”
browser _url=”h tt ps://w ww. y outube.com/w at ch ?
v =1 R0UgIgc b5g ”] [v c_sepa ra tor][/v c_colum n][v c_colum n
wi dth =”1 /3 ″][/v c_colum n][/v c_r ow][v c_r ow][v c_colum n
wi dth =”2 /3 ″][v c_t abs][v c_t ab ti tle=”A bout Th is Projec t”
tab_id=”1402713028-1-39e9a4-2f886e2a-
7d43″][vc_column_text]
Learn how to make a cluster computer u sing Raspberry Pi’s!
You can a lso use t his method to bui ld y our own super
computer.
[/vc_column_text][/vc_tab][v c_tab title=”Parts and
Downloads” tab_id=”14 027 1 3028-2-39e9a4 -2f886e2a-
7d43″][vc_column_text]
Acquiring the Part s
Here’s what y ou w ill need:
1 . 2 or more Raspberry Pi’s
2. SD cards for each Pi
3. Power Cables for ea ch Pi
4. Power ed USB Hub (optional)
5. Networking Cables
6. A Hub or a Router
27april
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://www.tinkernut.com/2014/04/make-cluster-computer/http://goo.gl/8doKXphttp://goo.gl/6kelAahttp://goo.gl/Zozwk9http://goo.gl/Pe6oNlhttp://goo.gl/P540y1http://goo.gl/srXHvmhttp://www.tinkernut.com/2014/04/make-cluster-computer/
8/17/2019 Make Cluster Computer Part 1
8/12
pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
TOTAL COST: ~$100.00 [ta bby t itle=”Softwa re”]
[/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 h ere.
Burn t he Raspbian Ima ge to your SD Card
If y ou h av e Windows, y ou ca n follow these instructions.
If y ou ha v e a Mac, y ou can follow these instructions.
Once the image is burned to your SD Card, but it into the
Raspberry Pi and boot it up wit h a Key board, Mouse,
Monitor and Intern et at tached.
Upon first boot, y ou should see the Rasbperry Pi
Configura tion screen (otherwise ty pe “sudo raspbi-
config“. Her e’s the options we’ll need to configu reExpand the File Sy stem
If needed, set the Intern ationa lization options to
match y our countries keyboard lay out.
Ov erlcock the Pi to 800 Mhz
Adv an ced Opt ions
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, a t the term inal comma nd
ty pe “sudo nano /etc/inittab”
Comm ent out th is line:
#1:2345:respawn:/sbin/getty --noclear
38400 tty1
An d add th is line ri gh t beneath it :
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://www.raspberrypi.org/downloads/http://www.raspberrypi.org/documentation/installation/installing-images/windows.mdhttp://www.raspberrypi.org/documentation/installation/installing-images/mac.md
8/17/2019 Make Cluster Computer Part 1
9/12
df d mi b PRO i Are you a developer? Try out the HTML to PDF API
1:2345:respawn:/bin/login -f pi tty1
/dev/tty1 2>&1
Now y ou can reboot y our Pi and it should aut o-login
[tabby title=”Terminal Comm ands”]
Insta lli ng MPICH
MPICH is software that allows for multi-processing
comm unicat ion between computers.
To install it on y our Raspberry Pi, first ma ke sure y ou
hav e a v alid Internet connection going to the Pi. Then
follow these Termina l Comma nds
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
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://www.mpich.org/
8/17/2019 Make Cluster Computer Part 1
10/12
df di b PRO i Are you a developer? Try out the HTML to PDF API
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 comma nds will download and in stall MPICH, as well
as add it as a pat h to your BASHRC boot file. Th e last
comm and ru ns a test to see if it works. If the last comm and
returns “Pi01” , then y ou did every thing successfully.
Installing MPI4PY
As it i s, MPICH can r un C an d Fortra n pr ogram s. Bu t since
the Raspberry Pi has the Pyt hon coding env ironment pre-
install ed, it would be easiest to install a Pyt hon to MPI
interpreter. Here’s the comma nds to do that:
sudo aptitude install python-dev
wget
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
8/17/2019 Make Cluster Computer Part 1
11/12
df di b PRO i A d l ? T t th HTML t PDF API
Get Google ChromeA faster way to browse the web. Stable, free & installs in seconds!
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_col
wi dth =”1 /3 ″][/v c_colum n][/v c_r ow]
Comm ents (8) Read more
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttps://googleads.g.doubleclick.net/aclk?sa=l&ai=CzerF9XDmVrjdN9G7hASckppY2-XHlwjT5p_J_wK_6KK9wAEQASDh25sKYMnW5o38pKgToAGF9rLdA8gBAagDAcgDw4SAAqoEf0_QKpXKwf-vEZBCOXzoh8VXc8gX5QZX_To7g839wgzwbG6VeK6MViaZKXTQV1AGMYnEcjL5EpIlGCWZh14pm_x6pcjBRdJ1QSaISNh8sdZjTPY8GJevfXJoSr_5si00TsB53yUpxD-BV_YwQXWiZbfzi5kEsbwc0SJcN8UiRZqAB-OJzSKoB6a-G9gHAQ&num=1&sig=AOD64_2u9C2O41b5_cJZpEEcUzb4VUga5g&client=ca-pub-9854942563736446&adurl=https://ad.doubleclick.net/ddm/trackclk/N5295.134426.GOOGLEDISPLAYNETWOR/B9519585.129338679%3Bdc_trk_aid%3D302284491%3Bdc_trk_cid%3D68244552%3Bdc_lat%3D%3Bdc_rdid%3D%3Btag_for_child_directed_treatment%3Dhttps://googleads.g.doubleclick.net/aclk?sa=l&ai=CzerF9XDmVrjdN9G7hASckppY2-XHlwjT5p_J_wK_6KK9wAEQASDh25sKYMnW5o38pKgToAGF9rLdA8gBAagDAcgDw4SAAqoEf0_QKpXKwf-vEZBCOXzoh8VXc8gX5QZX_To7g839wgzwbG6VeK6MViaZKXTQV1AGMYnEcjL5EpIlGCWZh14pm_x6pcjBRdJ1QSaISNh8sdZjTPY8GJevfXJoSr_5si00TsB53yUpxD-BV_YwQXWiZbfzi5kEsbwc0SJcN8UiRZqAB-OJzSKoB6a-G9gHAQ&num=1&sig=AOD64_2u9C2O41b5_cJZpEEcUzb4VUga5g&client=ca-pub-9854942563736446&adurl=https://ad.doubleclick.net/ddm/trackclk/N5295.134426.GOOGLEDISPLAYNETWOR/B9519585.129338679%3Bdc_trk_aid%3D302284491%3Bdc_trk_cid%3D68244552%3Bdc_lat%3D%3Bdc_rdid%3D%3Btag_for_child_directed_treatment%3Dhttps://googleads.g.doubleclick.net/aclk?sa=l&ai=CzerF9XDmVrjdN9G7hASckppY2-XHlwjT5p_J_wK_6KK9wAEQASDh25sKYMnW5o38pKgToAGF9rLdA8gBAagDAcgDw4SAAqoEf0_QKpXKwf-vEZBCOXzoh8VXc8gX5QZX_To7g839wgzwbG6VeK6MViaZKXTQV1AGMYnEcjL5EpIlGCWZh14pm_x6pcjBRdJ1QSaISNh8sdZjTPY8GJevfXJoSr_5si00TsB53yUpxD-BV_YwQXWiZbfzi5kEsbwc0SJcN8UiRZqAB-OJzSKoB6a-G9gHAQ&num=1&sig=AOD64_2u9C2O41b5_cJZpEEcUzb4VUga5g&client=ca-pub-9854942563736446&adurl=https://ad.doubleclick.net/ddm/trackclk/N5295.134426.GOOGLEDISPLAYNETWOR/B9519585.129338679%3Bdc_trk_aid%3D302284491%3Bdc_trk_cid%3D68244552%3Bdc_lat%3D%3Bdc_rdid%3D%3Btag_for_child_directed_treatment%3Dhttps://googleads.g.doubleclick.net/aclk?sa=l&ai=CzerF9XDmVrjdN9G7hASckppY2-XHlwjT5p_J_wK_6KK9wAEQASDh25sKYMnW5o38pKgToAGF9rLdA8gBAagDAcgDw4SAAqoEf0_QKpXKwf-vEZBCOXzoh8VXc8gX5QZX_To7g839wgzwbG6VeK6MViaZKXTQV1AGMYnEcjL5EpIlGCWZh14pm_x6pcjBRdJ1QSaISNh8sdZjTPY8GJevfXJoSr_5si00TsB53yUpxD-BV_YwQXWiZbfzi5kEsbwc0SJcN8UiRZqAB-OJzSKoB6a-G9gHAQ&num=1&sig=AOD64_2u9C2O41b5_cJZpEEcUzb4VUga5g&client=ca-pub-9854942563736446&adurl=https://ad.doubleclick.net/ddm/trackclk/N5295.134426.GOOGLEDISPLAYNETWOR/B9519585.129338679%3Bdc_trk_aid%3D302284491%3Bdc_trk_cid%3D68244552%3Bdc_lat%3D%3Bdc_rdid%3D%3Btag_for_child_directed_treatment%3Dhttps://mpi4py.googlecode.com/files/mpi4py-1.3.1.tar.gzhttp://www.patreon.com/tinkernuthttp://goo.gl/1dmi1http://www.facebook.com/tinkernuthttp://www.twitter.com/tinkernuthttp://www.tinkernut.com/2014/04/make-cluster-computer/#commentshttp://www.tinkernut.com/2014/04/make-cluster-computer/
8/17/2019 Make Cluster Computer Part 1
12/12df di b PRO i A d l ? T h HTML PDF API
Retro 201 5 © by Tinkernu t, LLC
Tinkernut Labs
http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.tinkernut.com%2ftag%2fpart-1%2f&id=ma-160314040639-a98f4ac2http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://www.tinkernut.com/