Added MPI framework. Now the algorithm works in a cluster.