Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add gatherv test
[simgrid.git] / src / smpi / colls / smpi_openmpi_selector.cpp
index 2809babd76e8a2c47f03b000be59018380dc022a..51602c6134d58163de6828219d541c1b46484bd3 100644 (file)
@@ -1,7 +1,7 @@
 /* selector for collective algorithms based on openmpi's default coll_tuned_decision_fixed selector
  * Updated 02/2022                                                          */
 
-/* Copyright (c) 2009-2022. The SimGrid Team.
+/* Copyright (c) 2009-2023. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 #include <memory>
 
-/* FIXME
-add algos:
-allreduce nonoverlapping, basic linear
-alltoall linear_sync
-bcast chain
-reduce_scatter butterfly
-scatter linear_nb
-*/
-
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 int allreduce__ompi(const void *sbuf, void *rbuf, int count,
                     MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
@@ -30,8 +20,8 @@ int allreduce__ompi(const void *sbuf, void *rbuf, int count,
     int communicator_size = comm->size();
     int alg = 1;
     int(*funcs[]) (const void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm)={
-        &allreduce__lr,
-        &allreduce__lr,
+        &allreduce__redbcast,
+        &allreduce__redbcast,
         &allreduce__rdb,
         &allreduce__lr,
         &allreduce__ompi_ring_segmented,
@@ -780,7 +770,7 @@ int reduce_scatter__ompi(const void *sbuf, void *rbuf,
         &reduce_scatter__default,
         &reduce_scatter__ompi_basic_recursivehalving,
         &reduce_scatter__ompi_ring,
-        &reduce_scatter__ompi_ring,
+        &reduce_scatter__ompi_butterfly,
     };
     /** Algorithms:
      *  {1, "non-overlapping"},
@@ -1070,10 +1060,10 @@ int allgatherv__ompi(const void *sbuf, int scount,
 
     int (*funcs[])(const void*, int, MPI_Datatype, void*, const int*, const int*, MPI_Datatype, MPI_Comm) = {
         &allgatherv__GB,
-       &allgatherv__ompi_bruck,
-       &allgatherv__mpich_ring,
-       &allgatherv__ompi_neighborexchange,
-       &allgatherv__pair
+        &allgatherv__ompi_bruck,
+        &allgatherv__mpich_ring,
+        &allgatherv__ompi_neighborexchange,
+        &allgatherv__pair
     };
     /** Algorithms:
      *  {1, "default"},
@@ -1196,8 +1186,8 @@ int gather__ompi(const void *sbuf, int scount,
     }
     int (*funcs[])(const void*, int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm) = {
         &gather__ompi_basic_linear,
-       &gather__ompi_binomial,
-       &gather__ompi_linear_sync
+        &gather__ompi_binomial,
+        &gather__ompi_linear_sync
     };
     /** Algorithms:
      *  {1, "basic_linear"},
@@ -1274,7 +1264,7 @@ int scatter__ompi(const void *sbuf, int scount,
     int (*funcs[])(const void*, int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm) = {
         &scatter__ompi_basic_linear,
         &scatter__ompi_binomial,
-       &scatter__ompi_basic_linear
+        &scatter__ompi_linear_nb
     };
     /** Algorithms:
      *  {1, "basic_linear"},
@@ -1345,5 +1335,4 @@ int scatter__ompi(const void *sbuf, int scount,
     return funcs[alg-1](sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);
 }
 
-}
-}
+} // namespace simgrid::smpi