Hello,

as I understand the Boost.MPI code, collective operations on types that need to be serialized always use point-to-point operations, e.g.
https://github.com/boostorg/mpi/blob/772337fa4749d5de7699842b6dae603f83d70db5/include/boost/mpi/collectives/broadcast.hpp#L102
https://github.com/boostorg/mpi/blob/772337fa4749d5de7699842b6dae603f83d70db5/src/broadcast.cpp#L18

This is vastly inefficient, and frankly the claim that MPI_Bcast cannot be used in this case does not make sense to me. Is there a case where something like
https://gist.github.com/lorenzhs/79dab54552fd1f9381da
would not work?

I used the same idea to implement an Allgatherv operation on vectors (including size exchanges) and have been using it without issues. However, that requires a bit of awfulness, and I severely doubt that such ugly code would ever make it into Boost.MPI ;) For the curious, it (along with some other wacky things which I do not recommend anyone use) can be found at
https://gist.github.com/lorenzhs/0ad22028cf6b68a91f3f#file-unsafe_mpi-hpp-L88

Cheers,
Lorenz

--
Karlsruhe Institute of Technology (KIT)
Institute of Theoretical Informatics

Lorenz Hübschle-Schneider

Am Fasanengarten 5
Building 50.34, Room 206
76131 Karlsruhe, Germany

Phone: +49 721 608-46602
Fax: +49 721 608-43088
Email: [email protected]
Web: http://www.kit.edu/

KIT – University of the State of Baden-Wuerttemberg and
National Research Center of the Helmholtz Association
_______________________________________________
Boost-mpi mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/boost-mpi

Reply via email to