X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d5b29830df70e823202e384a7655e4371193ecd7..88f49b34e91fe95b712d1545ae71a0896f5466c1:/src/smpi/colls/allgatherv/allgatherv-ompi-neighborexchange.cpp diff --git a/src/smpi/colls/allgatherv/allgatherv-ompi-neighborexchange.cpp b/src/smpi/colls/allgatherv/allgatherv-ompi-neighborexchange.cpp index e88c1882d0..bf7b05175d 100644 --- a/src/smpi/colls/allgatherv/allgatherv-ompi-neighborexchange.cpp +++ b/src/smpi/colls/allgatherv/allgatherv-ompi-neighborexchange.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2017. 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 @@ -63,17 +63,17 @@ * [5] [5] [5] [5] [5] [5] */ - #include "../colls_private.h" +#include "../colls_private.hpp" namespace simgrid{ namespace smpi{ int -Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount, - MPI_Datatype sdtype, - void* rbuf, int *rcounts, int *rdispls, - MPI_Datatype rdtype, - MPI_Comm comm) +allgatherv__ompi_neighborexchange(const void *sbuf, int scount, + MPI_Datatype sdtype, + void* rbuf, const int *rcounts, const int *rdispls, + MPI_Datatype rdtype, + MPI_Comm comm) { int line = -1; int rank, size; @@ -82,17 +82,15 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount, int i, even_rank; int err = 0; ptrdiff_t slb, rlb, sext, rext; - char *tmpsend = NULL, *tmprecv = NULL; - + char *tmpsend = nullptr, *tmprecv = nullptr; size = comm->size(); rank = comm->rank(); if (size % 2) { - XBT_DEBUG( - "coll:tuned:allgatherv_ompi_neighborexchange WARNING: odd size %d, switching to ring algorithm", + XBT_DEBUG("allgatherv__ompi_neighborexchange WARNING: odd size %d, switching to ring algorithm", size); - return Coll_allgatherv_ring::allgatherv(sbuf, scount, sdtype, + return allgatherv__ring(sbuf, scount, sdtype, rbuf, rcounts, rdispls, rdtype, comm); @@ -142,7 +140,7 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount, - Rest of the steps: update recv_data_from according to offset, and exchange two blocks with appropriate neighbor. - the send location becomes previous receve location. + the send location becomes previous receive location. Note, we need to create indexed datatype to send and receive these blocks properly. */