All there is to it is using the APIs provided by the MPI software, for ex. MPI_Send() and MPI_Recv().