Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'xbt_random' into 'master'
[simgrid.git] / src / smpi / colls / allgather / allgather-mvapich-smp.cpp
index 993efea..b53f6f9 100644 (file)
@@ -38,7 +38,7 @@
 namespace simgrid{
 namespace smpi{
 
-int Coll_allgather_mvapich2_smp::allgather(const void *sendbuf,int sendcnt, MPI_Datatype sendtype,
+int allgather__mvapich2_smp(const void *sendbuf,int sendcnt, MPI_Datatype sendtype,
                             void *recvbuf, int recvcnt,MPI_Datatype recvtype,
                             MPI_Comm  comm)
 {
@@ -54,10 +54,12 @@ int Coll_allgather_mvapich2_smp::allgather(const void *sendbuf,int sendcnt, MPI_
   }
 
   if (not comm->is_uniform() || not comm->is_blocked())
-    THROWF(arg_error,0, "allgather MVAPICH2 smp algorithm can't be used with irregular deployment. Please insure that processes deployed on the same node are contiguous and that each node has the same number of processes");
+    throw std::invalid_argument("allgather MVAPICH2 smp algorithm can't be used with irregular deployment. Please "
+                                "insure that processes deployed on the same node are contiguous and that each node has "
+                                "the same number of processes");
 
-    if (recvcnt == 0) {
-        return MPI_SUCCESS;
+  if (recvcnt == 0) {
+    return MPI_SUCCESS;
     }
 
     rank = comm->rank();
@@ -136,7 +138,7 @@ int Coll_allgather_mvapich2_smp::allgather(const void *sendbuf,int sendcnt, MPI_
 
 
 
-            mpi_errno = Coll_allgather_mpich::allgather(sendtmpbuf,
+            mpi_errno = allgather__mpich(sendtmpbuf,
                                                (recvcnt*local_size),
                                                recvtype,
                                                recvbuf, (recvcnt*local_size), recvtype,