#include #include int main(int argc, char **argv) { int size; int rank; int value=34567; int root=0; MPI::Init(argc, argv); size = MPI::COMM_WORLD.Get_size(); rank = MPI::COMM_WORLD.Get_rank(); MPI::COMM_WORLD.Bcast(&value, 1, MPI_INT, 0); cout << "Hello from process " << rank << " out of " << size << ", Received: " << value << endl; MPI::Finalize(); return 0; } /* recon -v lamhosts lamboot -v lamhosts LAM 6.5.6/MPI 2 C++/ROMIO - University of Notre Dame Executing hboot on n0 (deadend.tjhsst.edu - 1 CPU)... Executing hboot on n1 (helium.tjhsst.edu - 1 CPU)... Executing hboot on n2 (silicon.tjhsst.edu - 1 CPU)... Executing hboot on n3 (phosphorus.tjhsst.edu - 1 CPU)... Executing hboot on n4 (magnesium.tjhsst.edu - 1 CPU)... topology done mpiCC -o bcastCC bcastMPI.cpp mpirun N bcastCC Hello from process 0 out of 5, Received: 34567 Hello from process 3 out of 5, Received: 34567 Hello from process 1 out of 5, Received: 34567 Hello from process 2 out of 5, Received: 34567 Hello from process 4 out of 5, Received: 34567 */