You are on page 1of 14

Pemrograman paralel dengan MPICH di Ubuntu Server 10.

10

Langkah Awal
 

Instalasi ubuntu server 10.10 Kedua node


 

Master Slave

Spesifikasi Server
   

Prosessor Intel Centrino Duo @1.8Ghz RAM 256MB HDD 3GB VGA Default

Paket Paket Yang Diperlukan


       

build-essential gpc gfortran openjdk-6-jdk Mpich Nfs-kernel-server Nfs-common Openssh-server

./ifconfig


Ip master

# The primary network interface auto eth0 iface eth0 inet static address netmask network broadcast gateway 172.16.8.131 255.255.255.0 172.16.8.0 172.16.8.255 172.16.8.2

./ifconfig


Ip slave

# The primary network interface auto eth0 iface eth0 inet static address netmask network broadcast gateway 172.16.8.132 255.255.255.0 172.16.8.0 172.16.8.255 172.16.8.2

host-config


/etc/host (master) 127.0.0.1 localhost  172.16.8.131 cluster1  172.16.8.132 cluster2 /etc/hosts (slave)
   

127.0.0.1 localhost 172.16.8.132 cluster2 172.16.8.131 cluster1

./nfs


Server
 

root@cluster1:~# mkdir /mirror root@cluster1:~# echo /mirror *(rw/sync) >> /etc/exports

Client
 

root@cluster2:/mirror# mkdir /mirror root@cluster2:/mirror# mount cluster1:/mirror /mirror/

Auto-auth ssh


Master
  

ssh-keygen -t rsa ssh root@cluster2 mkdir -p .ssh cat /root/.ssh/id_rsa.pub | ssh root@cluster2 'cat >> /root/.ssh/authorized_keys' ssh-keygen -t rsa ssh root@cluster2 mkdir -p .ssh cat /root/.ssh/id_rsa.pub | ssh root@cluster1 'cat >> /root/.ssh/authorized_key'

Slave
  

./config mpich


Pengujian
  

which mpd which mpiexec which mpirun

./config daemon


Master


pico /etc/mpd.conf


secretword=toor

Slave


Pico /etc/mpd.conf


secretword=toor

chmod 600 [file config]

testing-daemon
  

root@cluster1:~# mpd & root@cluster1:~# mpdtrace root@cluster1:~# mpdallexit

testing-all-cluster
 

root@cluster1:~# mpdboot -n 2 root@cluster1:~# mpdtrace


Cluster1 Cluster2

testing-parralel-program

You might also like