Boost logo

Boost Users :

Subject: [Boost-users] [mpi/serialization] Potential bug or just library misunderstanding?
From: Tim Jacobs (tjacobs2_at_[hidden])
Date: 2011-09-30 11:18:42

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?


#include <boost/mpi.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/map.hpp>

main( int argc, char * argv [] )
  boost::mpi::environment env(argc, argv);
  boost::mpi::communicator world;

      std::map<int, std::vector<std::string> > test;
      world.send(1, 1, boost::mpi::skeleton(test));
      world.send(1, 1, boost::mpi::get_content(test));
      std::cout << "sent" << std::endl;
      std::map<int, std::vector<std::string> > test;

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at