[Boost-bugs] [Boost C++ Libraries] #5966: Cannot send std::map with more than 1 key/value pair

Subject: [Boost-bugs] [Boost C++ Libraries] #5966: Cannot send std::map with more than 1 key/value pair
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-30 19:19:05


#5966: Cannot send std::map with more than 1 key/value pair
-----------------------------------------------+----------------------------
 Reporter: Tim Jacobs <TimJacobs2@…> | Owner: dgregor
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: mpi
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
-----------------------------------------------+----------------------------
 Sending a std::map (or std::set) of size greater than 1 causes an
 MPI_ERR_TRUNCATE error. The following code reproduces this error:


 {{{
 #include <boost/mpi.hpp>
 #include <boost/serialization/map.hpp>

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

   if(world.rank()==0){
       std::map<int,int> test;
       test[1]=50;
       test[2]=100;
       world.send(1, 1, boost::mpi::skeleton(test));
       world.send(1, 1, boost::mpi::get_content(test));
       std::cout << "sent" << std::endl;
   }
   else{
       std::map<int,int> test;
       world.recv(0,1,boost::mpi::skeleton(test));
       world.recv(0,1,boost::mpi::get_content(test));
       std::cout << test.size() << std::endl;
   }
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5966>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC