Adding support for running under mpi