Implemented a general mpi dependency