X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cf07616d00639f39bad49729f9e63b7533eed9a4..8a9af89e44c0f7f2f648d402e89a26799910ee31:/src/smpi/colls/allreduce-mvapich-rs.cpp diff --git a/src/smpi/colls/allreduce-mvapich-rs.cpp b/src/smpi/colls/allreduce-mvapich-rs.cpp index bf8cba4d93..e887175454 100644 --- a/src/smpi/colls/allreduce-mvapich-rs.cpp +++ b/src/smpi/colls/allreduce-mvapich-rs.cpp @@ -49,8 +49,8 @@ int smpi_coll_tuned_allreduce_mvapich2_rs(void *sendbuf, is_commutative = (op==MPI_OP_NULL || op->is_commutative()); /* need to allocate temporary buffer to store incoming data */ - smpi_datatype_extent(datatype, &true_lb, &true_extent); - extent = smpi_datatype_get_extent(datatype); + datatype->extent(&true_lb, &true_extent); + extent = datatype->get_extent(); tmp_buf_free= smpi_get_tmp_recvbuffer(count * (MAX(extent, true_extent))); @@ -60,7 +60,7 @@ int smpi_coll_tuned_allreduce_mvapich2_rs(void *sendbuf, /* copy local data into recvbuf */ if (sendbuf != MPI_IN_PLACE) { mpi_errno = - smpi_datatype_copy(sendbuf, count, datatype, recvbuf, count, + Datatype::copy(sendbuf, count, datatype, recvbuf, count, datatype); } @@ -94,7 +94,7 @@ int smpi_coll_tuned_allreduce_mvapich2_rs(void *sendbuf, /* do the reduction on received data. since the ordering is right, it doesn't matter whether the operation is commutative or not. */ - if(op!=MPI_OP_NULL) op->apply( tmp_buf, recvbuf, &count, &datatype); + if(op!=MPI_OP_NULL) op->apply( tmp_buf, recvbuf, &count, datatype); /* change the rank */ newrank = rank / 2; } @@ -132,12 +132,12 @@ int smpi_coll_tuned_allreduce_mvapich2_rs(void *sendbuf, if (is_commutative || (dst < rank)) { /* op is commutative OR the order is already right */ - if(op!=MPI_OP_NULL) op->apply( tmp_buf, recvbuf, &count, &datatype); + if(op!=MPI_OP_NULL) op->apply( tmp_buf, recvbuf, &count, datatype); } else { /* op is noncommutative and the order is not right */ - if(op!=MPI_OP_NULL) op->apply( recvbuf, tmp_buf, &count, &datatype); + if(op!=MPI_OP_NULL) op->apply( recvbuf, tmp_buf, &count, datatype); /* copy result back into recvbuf */ - mpi_errno = smpi_datatype_copy(tmp_buf, count, datatype, + mpi_errno = Datatype::copy(tmp_buf, count, datatype, recvbuf, count, datatype); } mask <<= 1; @@ -204,7 +204,7 @@ int smpi_coll_tuned_allreduce_mvapich2_rs(void *sendbuf, if(op!=MPI_OP_NULL) op->apply( (char *) tmp_buf + disps[recv_idx] * extent, (char *) recvbuf + disps[recv_idx] * extent, - &recv_cnt, &datatype); + &recv_cnt, datatype); /* update send_idx for next iteration */ send_idx = recv_idx;