X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/31b7fa457f9267af8eda2eee06aae74dd78eb412..fccf53a380a9a6de6c8bd9eafb182a91d79e1d3c:/src/smpi/smpi_base.c diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 8bb4d4f093..d1945536a1 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -24,8 +24,8 @@ static int match_recv(void* a, void* b) { MPI_Request ref = (MPI_Request)a; MPI_Request req = (MPI_Request)b; - xbt_assert0(ref, "Cannot match recv against null reference"); - xbt_assert0(req, "Cannot match recv against null request"); + xbt_assert(ref, "Cannot match recv against null reference"); + xbt_assert(req, "Cannot match recv against null request"); return req->comm == ref->comm && (ref->src == MPI_ANY_SOURCE || req->src == ref->src) && (ref->tag == MPI_ANY_TAG || req->tag == ref->tag); @@ -35,8 +35,8 @@ static int match_send(void* a, void* b) { MPI_Request ref = (MPI_Request)a; MPI_Request req = (MPI_Request)b; - xbt_assert0(ref, "Cannot match send against null reference"); - xbt_assert0(req, "Cannot match send against null request"); + xbt_assert(ref, "Cannot match send against null reference"); + xbt_assert(req, "Cannot match send against null request"); return req->comm == ref->comm && (req->src == MPI_ANY_SOURCE || req->src == ref->src) && (req->tag == MPI_ANY_TAG || req->tag == ref->tag); @@ -89,7 +89,7 @@ void smpi_mpi_start(MPI_Request request) { smx_rdv_t mailbox; - xbt_assert0(!request->action, + xbt_assert(!request->action, "Cannot (re)start a non-finished communication"); if(request->flags & RECV) { print_request("New recv", request); @@ -212,9 +212,8 @@ static void finish_wait(MPI_Request * request, MPI_Status * status) status->MPI_SOURCE = req->src; status->MPI_TAG = req->tag; status->MPI_ERROR = MPI_SUCCESS; - status->count = SIMIX_req_comm_get_dst_buff_size(req->action); + status->count = req->size; } - SIMIX_req_comm_destroy(req->action); print_request("Finishing", req); if(req->flags & NON_PERSISTENT) { smpi_mpi_request_free(request); @@ -287,7 +286,7 @@ int smpi_mpi_waitany(int count, MPI_Request requests[], comms = xbt_dynar_new(sizeof(smx_action_t), NULL); map = xbt_new(int, count); size = 0; - DEBUG0("Wait for one of"); + XBT_DEBUG("Wait for one of"); for(i = 0; i < count; i++) { if(requests[i] != MPI_REQUEST_NULL) { print_request(" ", requests[i]); @@ -477,13 +476,12 @@ void smpi_mpi_allgatherv(void *sendbuf, int sendcount, MPI_Datatype recvtype, MPI_Comm comm) { int system_tag = 666; - int rank, size, other, index, sendsize, recvsize; + int rank, size, other, index, sendsize; MPI_Request *requests; rank = smpi_comm_rank(comm); size = smpi_comm_size(comm); sendsize = smpi_datatype_size(sendtype); - recvsize = smpi_datatype_size(recvtype); // Local copy from self memcpy(&((char *) recvbuf)[displs[rank]], sendbuf, sendcount * sendsize * sizeof(char)); @@ -553,7 +551,7 @@ void smpi_mpi_scatterv(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm) { int system_tag = 666; - int rank, size, dst, index, sendsize, recvsize; + int rank, size, dst, index, recvsize; MPI_Request *requests; rank = smpi_comm_rank(comm); @@ -563,7 +561,6 @@ void smpi_mpi_scatterv(void *sendbuf, int *sendcounts, int *displs, smpi_mpi_recv(recvbuf, recvcount, recvtype, root, system_tag, comm, MPI_STATUS_IGNORE); } else { - sendsize = smpi_datatype_size(sendtype); recvsize = smpi_datatype_size(recvtype); // Local copy from root memcpy(recvbuf, &((char *) sendbuf)[displs[root]],