X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3a1ea70a418f393ca1677074e928c664022295bd..HEAD:/src/smpi/colls/allgather/allgather-mvapich-smp.cpp diff --git a/src/smpi/colls/allgather/allgather-mvapich-smp.cpp b/src/smpi/colls/allgather/allgather-mvapich-smp.cpp index 8297387e5b..18725e356b 100644 --- a/src/smpi/colls/allgather/allgather-mvapich-smp.cpp +++ b/src/smpi/colls/allgather/allgather-mvapich-smp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2020. 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 @@ -35,8 +35,7 @@ * See COPYRIGHT in top-level directory. */ #include "../colls_private.hpp" -namespace simgrid{ -namespace smpi{ +namespace simgrid::smpi { int allgather__mvapich2_smp(const void *sendbuf,int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt,MPI_Datatype recvtype, @@ -117,12 +116,12 @@ int allgather__mvapich2_smp(const void *sendbuf,int sendcnt, MPI_Datatype sendty recvcnts[i] = node_sizes[i] * recvcnt; } - void* sendbuf=((char*)recvbuf)+recvtype->get_extent()*displs[leader_comm->rank()]; + void* sendtmpbuf = ((char*)recvbuf) + recvtype->get_extent() * displs[leader_comm->rank()]; - mpi_errno = colls::allgatherv(sendbuf, (recvcnt * local_size), recvtype, recvbuf, recvcnts, displs, - recvtype, leader_comm); - delete[] displs; - delete[] recvcnts; + mpi_errno = colls::allgatherv(sendtmpbuf, (recvcnt * local_size), recvtype, recvbuf, recvcnts, displs, + recvtype, leader_comm); + delete[] displs; + delete[] recvcnts; } else { void* sendtmpbuf=((char*)recvbuf)+recvtype->get_extent()*(recvcnt*local_size)*leader_comm->rank(); @@ -142,5 +141,4 @@ int allgather__mvapich2_smp(const void *sendbuf,int sendcnt, MPI_Datatype sendty return mpi_errno; } -} -} +} // namespace simgrid::smpi