-/* 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
*/
//#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)
{
MPI_Aint extent;
extent = dtype->get_extent();
- /* when communication size is smaller than number of process (not support) */
if (rcount < size) {
- XBT_WARN("MPI_allreduce_lr use default MPI_allreduce.");
- allreduce__default(sbuf, rbuf, rcount, dtype, op, comm);
+ XBT_INFO("MPI_allreduce_lr: communication size smaller than number of process, use default MPI_allreduce.");
+ allreduce__redbcast(sbuf, rbuf, rcount, dtype, op, comm);
return MPI_SUCCESS;
}
return 0;
}
-}
-}
+} // namespace simgrid::smpi