diff --git a/cs677/hw6/src/mpi-round-trip.cc b/cs677/hw6/src/mpi-round-trip.cc index 23dfcf2..2ced1a6 100644 --- a/cs677/hw6/src/mpi-round-trip.cc +++ b/cs677/hw6/src/mpi-round-trip.cc @@ -1,5 +1,5 @@ -#include +#include #include using namespace std; @@ -10,18 +10,18 @@ int main(int argc, char * argv[]) MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - if (my_rank == MASTER) + if (my_rank == 0) { int buf = 0; MPI_Recv(&buf, sizeof(buf), MPI_CHAR, - MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD); + MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); cout << "Master received " << buf << endl; } else { int forty_two = 42; MPI_Send(&forty_two, sizeof(forty_two), MPI_CHAR, - MASTER, 42, MPI_COMM_WORLD); + 0, 42, MPI_COMM_WORLD); } MPI_Finalize();