From: Geoffrey Irving (irving_at_[hidden])
Date: 2006-09-07 13:15:56


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