/* 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)
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,
&reduce_scatter__default,
&reduce_scatter__ompi_basic_recursivehalving,
&reduce_scatter__ompi_ring,
- &reduce_scatter__ompi_ring,
+ &reduce_scatter__ompi_butterfly,
};
/** Algorithms:
* {1, "non-overlapping"},
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"},
}
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"},
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"},
return funcs[alg-1](sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);
}
-}
-}
+} // namespace simgrid::smpi