Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / smpi / colls / allreduce / allreduce-lr.cpp
index e8e46c7..517bd69 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2021. The SimGrid Team.
+/* Copyright (c) 2013-2023. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -18,8 +18,7 @@
 */
 
 //#include <star-reduction.c>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int allreduce__lr(const void *sbuf, void *rbuf, int rcount,
                   MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
@@ -38,7 +37,7 @@ int allreduce__lr(const void *sbuf, void *rbuf, int rcount,
 
   if (rcount < size) {
     XBT_INFO("MPI_allreduce_lr: communication size smaller than number of process, use default MPI_allreduce.");
-    allreduce__default(sbuf, rbuf, rcount, dtype, op, comm);
+    allreduce__redbcast(sbuf, rbuf, rcount, dtype, op, comm);
     return MPI_SUCCESS;
   }
 
@@ -101,5 +100,4 @@ int allreduce__lr(const void *sbuf, void *rbuf, int rcount,
 
   return 0;
 }
-}
-}
+} // namespace simgrid::smpi