X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d656f9465e7b1c36319f86eeafdcec58fe9551a4..1e9ffea6fdfe24e3268eebcda6fa00d34d6a652b:/src/smpi/colls/allgather/allgather-loosely-lr.cpp diff --git a/src/smpi/colls/allgather/allgather-loosely-lr.cpp b/src/smpi/colls/allgather/allgather-loosely-lr.cpp index 1994579c70..5281cc1eda 100644 --- a/src/smpi/colls/allgather/allgather-loosely-lr.cpp +++ b/src/smpi/colls/allgather/allgather-loosely-lr.cpp @@ -1,19 +1,17 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "../colls_private.hpp" +#include "xbt/string.hpp" -namespace simgrid{ -namespace smpi{ +namespace simgrid::smpi { - -int Coll_allgather_loosely_lr::allgather(void *sbuf, int scount, - MPI_Datatype stype, void *rbuf, - int rcount, MPI_Datatype rtype, - MPI_Comm comm) +int allgather__loosely_lr(const void *sbuf, int scount, + MPI_Datatype stype, void *rbuf, + int rcount, MPI_Datatype rtype, + MPI_Comm comm) { int comm_size, rank; int tag = COLL_TAG_ALLGATHER; @@ -32,7 +30,9 @@ if(comm->get_leaders_comm()==MPI_COMM_NULL){ } if(comm_size%num_core) - THROWF(arg_error,0, "allgather loosely lr algorithm can't be used with non multiple of NUM_CORE=%d number of processes ! ",num_core); + throw std::invalid_argument(xbt::string_printf( + "allgather loosely lr algorithm can't be used with non multiple of NUM_CORE=%d number of processes!", + num_core)); rank = comm->rank(); MPI_Aint rextent, sextent; @@ -135,6 +135,4 @@ if(comm->get_leaders_comm()==MPI_COMM_NULL){ return MPI_SUCCESS; } - -} -} +} // namespace simgrid::smpi