X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d5cc61332edae35867a41bb38ad9401faaab2716..ea74f5d95928a521a588737e81f1de94eef25d19:/src/smpi/colls/allgather/allgather-smp-simple.cpp diff --git a/src/smpi/colls/allgather/allgather-smp-simple.cpp b/src/smpi/colls/allgather/allgather-smp-simple.cpp index dcaaecd19e..71180e04ee 100644 --- a/src/smpi/colls/allgather/allgather-smp-simple.cpp +++ b/src/smpi/colls/allgather/allgather-smp-simple.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2019. The SimGrid Team. +/* Copyright (c) 2013-2022. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -10,10 +10,10 @@ namespace simgrid{ namespace smpi{ -int Coll_allgather_smp_simple::allgather(const void *send_buf, int scount, - MPI_Datatype stype, void *recv_buf, - int rcount, MPI_Datatype rtype, - MPI_Comm comm) +int allgather__smp_simple(const void *send_buf, int scount, + MPI_Datatype stype, void *recv_buf, + int rcount, MPI_Datatype rtype, + MPI_Comm comm) { int src, dst, comm_size, rank; comm_size = comm->size(); @@ -27,7 +27,9 @@ int Coll_allgather_smp_simple::allgather(const void *send_buf, int scount, } if(comm_size%num_core) - THROWF(arg_error,0, "allgather SMP simple 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 SMP simple algorithm can't be used with non multiple of NUM_CORE=%d number of processes!", + num_core)); rank = comm->rank(); MPI_Aint rextent, sextent; @@ -74,9 +76,9 @@ int Coll_allgather_smp_simple::allgather(const void *send_buf, int scount, if (intra_rank == 0) { int num_req = (inter_comm_size - 1) * 2; - MPI_Request* reqs = new MPI_Request[num_req]; + auto* reqs = new MPI_Request[num_req]; MPI_Request* req_ptr = reqs; - MPI_Status* stat = new MPI_Status[num_req]; + auto* stat = new MPI_Status[num_req]; for (i = 1; i < inter_comm_size; i++) {