X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c468e95ef526199c64b83d5ab0356100c532571d..db41dc7d999a5792aca42198b5bc87edb2dbfcce:/src/smpi/colls/reduce_scatter/reduce_scatter-ompi.cpp diff --git a/src/smpi/colls/reduce_scatter/reduce_scatter-ompi.cpp b/src/smpi/colls/reduce_scatter/reduce_scatter-ompi.cpp index 8e9efebb81..a2d3687682 100644 --- a/src/smpi/colls/reduce_scatter/reduce_scatter-ompi.cpp +++ b/src/smpi/colls/reduce_scatter/reduce_scatter-ompi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2022. The SimGrid Team. +/* Copyright (c) 2013-2023. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -41,8 +41,7 @@ * Returns: - MPI_SUCCESS or error code * Limitation: - Works only for commutative operations. */ -namespace simgrid { -namespace smpi { +namespace simgrid::smpi { int reduce_scatter__ompi_basic_recursivehalving(const void *sbuf, void *rbuf, const int *rcounts, @@ -643,10 +642,10 @@ int reduce_scatter__ompi_butterfly( precv = tmpbuf[1] - gap; if (sbuf != MPI_IN_PLACE) { - err = Datatype::copy(sbuf, totalcount, dtype, psend, totalcount, dtype); - if (MPI_SUCCESS != err) { goto cleanup_and_return; } + err = Datatype::copy(sbuf, totalcount, dtype, psend, totalcount, dtype); + if (MPI_SUCCESS != err) { goto cleanup_and_return; } } else { - err = Datatype::copy(rbuf, totalcount, dtype, psend, totalcount, dtype); + err = Datatype::copy(rbuf, totalcount, dtype, psend, totalcount, dtype); if (MPI_SUCCESS != err) { goto cleanup_and_return; } } @@ -683,7 +682,7 @@ int reduce_scatter__ompi_butterfly( /* Odd process */ Request::recv(precv, totalcount, dtype, rank - 1, COLL_TAG_REDUCE_SCATTER, comm, MPI_STATUS_IGNORE); - op->apply(precv, psend, (int*)&totalcount, dtype); + op->apply(precv, psend, (int*)&totalcount, dtype); /* Adjust rank to be the bottom "remain" ranks */ vrank = rank / 2; } @@ -803,5 +802,4 @@ cleanup_and_return: free(tmpbuf[1]); return err; } -} -} +} // namespace simgrid::smpi