Add MPI code

This code is tested for MPI cluster: