Experiment No. 1
Aim : To prepare Beagle Bone Black cluster
or Computer cluster using MPI
Procedure :
How to create BBB
cluster or Computer cluster? Write all steps
Theory:
< 1. What is Beagle bone black?
< 2. How to access it?
< 3. What are the Types of addresses?
< 4. How to set the Ethernet address?
< 5.Applications of BBB cluster.
< 6. What is MPI? Explain in brief
Refer: http://mpitutorial.com/tutorials/
Prerequisite: Ubuntu
14.04 (64 bit preferred)
Installations:
1. Execute
command: sudo apt-get update
2. Install
MPI:
sudo apt-get
install openmpi-bin openmpi-common libopenmpi1.6 libopenmpi-dev
3. On
Slave nodes install SSH Server: sudo
apt-get install openssh-server
5. Generate
ssh key on master as well as slave: ssh-keygen
-t dsa
6. Enter
any string as password on prompted window
7. Execute
on Server node
cp /home/username/.ssh/id_dsa.pub
/home/ username/.ssh/authorized_keys
8. Make
sure slave machines know that server is authorized to access everything on
slave:
scp
/home/mpiuser/.ssh/id_dsa.pub username@IP_address:.ssh/authorized_keys
9. Change
file permissions on both master and slave:
chmod
700 /home/mpiuser/.ssh
chmod 600 /home/mpiuser/.ssh/authorized_keys
10.
Test ssh connection: ssh username@IP_Address
11.
To ensure SSH does not ask for password,
use ssh-agent to remember ssh password: eval
`ssh-agent`
12.
Tell ssh-agent the password for the SSH
key: ssh-add ~/.ssh/id_dsa
13.
Test by logging in that it doesn’t ask
for password: ssh username@IP_Address
14.
Configuring Open MPI: to let Open MPI
know cluster computers information write host_file:
Example:
|
# The Hostfile
for Open MPI
# The master
node, 'slots=2' is used because it is a dual-processor machine.
127.0.0.1
slots=2
# The
following slave nodes are single processor machines:
10.10.210.101
10.10.210.102
10.10.210.103
|
15.
Compile MPI program: mpicc testprogram.c
16.
To run program on two processes on local
machine: mpirun -np 2 ./a.out
17.
To run over 6 processes on cluster: mpirun -np 6 --hostfile host_file ./a.out
No comments:
Post a Comment