Definition
MPI_Sendrecv_replace is a combination of an MPI_Send and an MPI_Recv. It can be seen as having both subroutines executed concurrently. The difference with MPI_Sendrecv is that MPI_Sendrecv_replace uses the same buffer for sending and receiving. This also implies that the amount and type of data sent and received are identical.
int MPI_Sendrecv_replace(void* buffer,
int count_send,
MPI_Datatype datatype_send,
int recipient,
int tag_send,
int sender,
int tag_recv,
MPI_Comm communicator,
MPI_Status* status);