#include #include #include #include #include namespace mpi = boost::mpi; int main(int argc, char *argv[]) { mpi::environment env(argc, argv); mpi::communicator world; std::string str; mpi::content content; if (world.rank () == 0) str = "hello"; mpi::broadcast (world, mpi::skeleton(str), 0); std::cout << "Process " << world.rank () << " receaved skeleton" << std::endl; content = mpi::get_content (str); mpi::broadcast (world, content, 0); std::cout << "Process " << world.rank () << " receaved content: " << str << std::endl; }