A. Getting Started
To install MPI on Ubuntu is very easy. You can open terminal and type this command :

root@toto-K42F:/home/toto# sudo apt-get install libcr-dev mpich2 mpich2-doc

B. Starting with MPI program
File name : latihan_1.c

/* First Example*/

#include <stdio.h>
#include <mpi.h>

int main(int argc, char *argv[])
 {
 int rank ; // inisialization #processor
 int size;

MPI_Init(&argc, &argv); /* start with MPI*/
 MPI_Comm_rank (MPI_COMM_WORLD, &rank); /* get curent process id*/
 MPI_Comm_size (MPI_COMM_WORLD, &size); /* get number of processor*/
 printf("Hello world from process %d of %d \n", rank, size);
 MPI_Finalize();
 return 0;

}
C. Compilation MPI Program 
toto@toto-K42F:~/Documents/Latihan_C$ mpicc latihan_1.c -o hello
D. Running MPI Program 
toto@toto-K42F:~/Documents/Latihan_C$ mpirun -np 10 ./hello


Hello world from process 0 of 10 
Hello world from process 5 of 10 
Hello world from process 7 of 10 
Hello world from process 8 of 10 
Hello world from process 6 of 10 
Hello world from process 4 of 10 
Hello world from process 1 of 10 
Hello world from process 2 of 10 
Hello world from process 9 of 10 
Hello world from process 3 of 10 

Good Luck!