]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/colls/allgather/allgather-loosely-lr.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / smpi / colls / allgather / allgather-loosely-lr.cpp
index 575356ad6607cf3dc9c07db74a76540fd8fd3fb4..03be4ac3097d154a824da757df5be116bd7dc011 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2019. The SimGrid Team.
+/* Copyright (c) 2013-2021. 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_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 +32,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;