PPT Slide
Note that this is a very poor way to solve this numerical problem, and this method is being used only because it is very simple. Fortunately, the MPI parts of this example are very similar to those that are used in the better parallel algorithms for this problem. In particular, the use of ghost points in the parallel data structure is very similar to what is used in methods such as Conjugate Gradient or Multigrid.
You may want to use these MPI routines in your solution:
MPI_Init MPI_Finalize MPI_Send MPI_Recv MPI_Allreduce MPI_Comm_size