I'm not sure why the following test-class produces this error: "MPI_Recv:
MPI_ERR_TRUNCATE: message truncated"
If the std::map has only a single element (ie I remove one of the
test[].push_back() lines) the error does not occur. Can someone verify that
this is indeed a bug and not just novice misuse of the library?
Thanks,
Tim
#include
#include
#include
#include
int
main( int argc, char * argv [] )
{
boost::mpi::environment env(argc, argv);
boost::mpi::communicator world;
if(world.rank()==0){
std::mapstd::string > test;
test[1].push_back("FOO");
test[50].push_back("BAR");
world.send(1, 1, boost::mpi::skeleton(test));
world.send(1, 1, boost::mpi::get_content(test));
std::cout << "sent" << std::endl;
}
else{
std::mapstd::string > test;
world.recv(0,1,boost::mpi::skeleton(test));
world.recv(0,1,boost::mpi::get_content(test));
}
}