MPI: Message Passing Interface
Application passes messages between processes in order to perform a task and
hence by achieving communication we achieve parallel computing.
ex: Master processes can pass message to slave process for sorting. and slave
processes in return will send sorted elements.
A communicator defines a group of processes that have the ability to
communicate with one another. In this group of processes, each is assigned a
unique rank, and they explicitly communicate with one another by their ranks.
The foundation of communication is built upon send and receive operations
among processes. A process may send a message to another process by
providing the rank of the process and a unique tag to identify the message.
Step1: Installing MPICH2:
Installing MPICH2 on master
Installing MPICH2 on client side
Step 2: Configure host file on both of the systems
Step 3 : Create and login with new user
Step 4:Setting up SSH (KEY)
Step 5: Setting up NFS
You share a directory via NFS in master which the client mounts to exchange
data.
Install the required packages by
$ sudo apt-get install nfs-kernel-server
Now, (assuming you are still logged into mpiuser), let’s create a folder by the
name cloud that we will share across in the network.
$ mkdir cloud
To export the cloud directory, you create an entry in /etc/exports
Step 6: Running MPI program
On Multiple cores: