#include #include #include #include namespace mpi = boost::mpi; using namespace std; int main() { mpi::environment env; mpi::communicator world; string msg; if (world.rank() == 0) { world.send(1, 0, string("Hello")); world.recv(1, 1, msg); cout << msg << "!" << endl; } else { world.recv(0, 0, msg); cout << "Proc 1 Got " << msg << endl; world.send(0, 1, string(msg+" world")); } return 0; }