
Oops. I found the new array optimizations in serialization CVS. It might be worth adding a note in the MPI documentation to this effect, especially since the current serialization documentation says that serializing an array translates directly into a for loop outside of the archive classes. Would it be straightforward to extend the array optimizations to handle run-time strided arrays (which are necessary to send slices of multidimensional arrays)? If simple array support required modifying (improving) serialization, would strides require it as well? Thanks, Geoffrey On Thu, Sep 07, 2006 at 10:15:56AM -0700, Geoffrey Irving wrote:
Hello,
Not a review, just a quick question:
If I have a large array to send over MPI, and both processors know the size/shape (i.e., it doesn't have to be sent), I can send it via the C++ bindings like this:
// rank 0 std::vector<int> huge(N); MPI::Datatype datatype=MPI::INT.Create_vector(N,1,1); comm.Send(&huge[0],datatype,1,1);
// rank 1 std::vector<int> huge(N); MPI::Datatype datatype=MPI::INT.Create_vector(N,1,1); comm.Recv(&huge[0],datatype,0,1);
The call to Create_vector takes constant time. The analogous Boost.MPI code runs serialization on huge, and seems to take linear time. Is there any way to avoid this performance hit?
Thanks, Geoffrey