Ticket #10669: test.cpp

File test.cpp, 415 bytes (added by sam.bateman@…, 8 years ago)

Program to demonstrate the bug

Line 
1#include <boost/mpi.hpp>
2#include <boost/serialization/map.hpp>
3#include <iostream>
4#include <map>
5
6using namespace std;
7using namespace boost;
8
9int main(int argc, char** argv)
10{
11 mpi::environment env(argc, argv);
12 mpi::communicator comm;
13
14 map<int, int> data;
15 data[0] = 1;
16
17 cout << comm.rank() << ": broadcasting data" << endl;
18 mpi::broadcast(comm, data, 0);
19 cout << comm.rank() << ": done!" << endl;
20}