
7 Sep
2006
7 Sep
'06
5:15 p.m.
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