X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6633f5c4d1b7d52fa54306ee3fb7eb573daeb274..a521b79fb5f8fc07b3f9102cec6de074186fe5c1:/src/smpi/colls/reduce/reduce-ompi.cpp?ds=sidebyside diff --git a/src/smpi/colls/reduce/reduce-ompi.cpp b/src/smpi/colls/reduce/reduce-ompi.cpp index ce4d8d5f68..ccdd68e07a 100644 --- a/src/smpi/colls/reduce/reduce-ompi.cpp +++ b/src/smpi/colls/reduce/reduce-ompi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2019. The SimGrid Team. +/* Copyright (c) 2013-2020. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -80,7 +80,7 @@ int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int ptrdiff_t true_extent, real_segment_size; true_extent=datatype->get_extent(); - /* handle non existant recv buffer (i.e. its NULL) and + /* handle non existent recv buffer (i.e. its NULL) and protect the recv buffer on non-root nodes */ accumbuf = static_cast(recvbuf); if (nullptr == accumbuf || root != rank) { @@ -95,7 +95,7 @@ int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int } /* If this is a non-commutative operation we must copy - sendbuf to the accumbuf, in order to simplfy the loops */ + sendbuf to the accumbuf, in order to simplify the loops */ if ((op != MPI_OP_NULL && not op->is_commutative())) { Datatype::copy(sendtmpbuf, original_count, datatype, accumbuf, original_count, datatype); } @@ -235,7 +235,7 @@ int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int */ else { - /* If the number of segments is less than a maximum number of oustanding + /* If the number of segments is less than a maximum number of outstanding requests or there is no limit on the maximum number of outstanding requests, we send data to the parent using blocking send */ if ((0 == max_outstanding_reqs) || @@ -328,11 +328,11 @@ int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int */ -int Coll_reduce_ompi_chain::reduce(const void *sendbuf, void *recvbuf, int count, - MPI_Datatype datatype, - MPI_Op op, int root, - MPI_Comm comm - ) +int reduce__ompi_chain(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, + MPI_Op op, int root, + MPI_Comm comm + ) { uint32_t segsize=64*1024; int segcount = count; @@ -356,10 +356,10 @@ int Coll_reduce_ompi_chain::reduce(const void *sendbuf, void *recvbuf, int count } -int Coll_reduce_ompi_pipeline::reduce(const void *sendbuf, void *recvbuf, - int count, MPI_Datatype datatype, - MPI_Op op, int root, - MPI_Comm comm ) +int reduce__ompi_pipeline(const void *sendbuf, void *recvbuf, + int count, MPI_Datatype datatype, + MPI_Op op, int root, + MPI_Comm comm ) { uint32_t segsize; @@ -400,10 +400,10 @@ int Coll_reduce_ompi_pipeline::reduce(const void *sendbuf, void *recvbuf, segcount, 0); } -int Coll_reduce_ompi_binary::reduce(const void *sendbuf, void *recvbuf, - int count, MPI_Datatype datatype, - MPI_Op op, int root, - MPI_Comm comm) +int reduce__ompi_binary(const void *sendbuf, void *recvbuf, + int count, MPI_Datatype datatype, + MPI_Op op, int root, + MPI_Comm comm) { uint32_t segsize; int segcount = count; @@ -430,10 +430,10 @@ int Coll_reduce_ompi_binary::reduce(const void *sendbuf, void *recvbuf, segcount, 0); } -int Coll_reduce_ompi_binomial::reduce(const void *sendbuf, void *recvbuf, - int count, MPI_Datatype datatype, - MPI_Op op, int root, - MPI_Comm comm) +int reduce__ompi_binomial(const void *sendbuf, void *recvbuf, + int count, MPI_Datatype datatype, + MPI_Op op, int root, + MPI_Comm comm) { uint32_t segsize=0; @@ -474,14 +474,14 @@ int Coll_reduce_ompi_binomial::reduce(const void *sendbuf, void *recvbuf, * reduce_intra_in_order_binary * * Function: Logarithmic reduce operation for non-commutative operations. - * Acecpts: same as MPI_Reduce() + * Accepts: same as MPI_Reduce() * Returns: MPI_SUCCESS or error code */ -int Coll_reduce_ompi_in_order_binary::reduce(const void *sendbuf, void *recvbuf, - int count, - MPI_Datatype datatype, - MPI_Op op, int root, - MPI_Comm comm) +int reduce__ompi_in_order_binary(const void *sendbuf, void *recvbuf, + int count, + MPI_Datatype datatype, + MPI_Op op, int root, + MPI_Comm comm) { uint32_t segsize=0; int ret; @@ -586,12 +586,11 @@ int Coll_reduce_ompi_in_order_binary::reduce(const void *sendbuf, void *recvbuf, * Returns: - MPI_SUCCESS or error code */ -int -Coll_reduce_ompi_basic_linear::reduce(const void *sbuf, void *rbuf, int count, - MPI_Datatype dtype, - MPI_Op op, - int root, - MPI_Comm comm) +int reduce__ompi_basic_linear(const void *sbuf, void *rbuf, int count, + MPI_Datatype dtype, + MPI_Op op, + int root, + MPI_Comm comm) { int i, rank, size; ptrdiff_t true_extent, lb, extent;