+int PMPI_Sendrecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, int dst, int sendtag, void* recvbuf,
+ int recvcount, MPI_Datatype recvtype, int src, int recvtag, MPI_Comm comm, MPI_Status* status)
+{
+ int retval = 0;
+ SET_BUF1(sendbuf)
+ SET_BUF2(recvbuf)
+ CHECK_COUNT(2, sendcount)
+ CHECK_TYPE(3, sendtype)
+ CHECK_TAG(5, sendtag)
+ CHECK_COUNT(7, recvcount)
+ CHECK_TYPE(8, recvtype)
+ CHECK_BUFFER(1, sendbuf, sendcount, sendtype)
+ CHECK_BUFFER(6, recvbuf, recvcount, recvtype)
+ CHECK_ARGS(sendbuf == recvbuf && sendcount > 0 && recvcount > 0, MPI_ERR_BUFFER,
+ "%s: Invalid parameters 1 and 6: sendbuf and recvbuf must be disjoint", __func__);
+ CHECK_TAG(10, recvtag)
+ CHECK_COMM(11)
+ const SmpiBenchGuard suspend_bench;
+
+ if (src == MPI_PROC_NULL) {
+ if(status!=MPI_STATUS_IGNORE){
+ simgrid::smpi::Status::empty(status);
+ status->MPI_SOURCE = MPI_PROC_NULL;
+ }
+ if(dst != MPI_PROC_NULL)
+ simgrid::smpi::Request::send(sendbuf, sendcount, sendtype, dst, sendtag, comm);