diff --git a/AUTh Courses/Parallel and Distributed Systems/02-gameoflife/game-of-life-parallel/src/play.c b/AUTh Courses/Parallel and Distributed Systems/02-gameoflife/game-of-life-parallel/src/play.c index 8c16c21..66393b8 100644 --- a/AUTh Courses/Parallel and Distributed Systems/02-gameoflife/game-of-life-parallel/src/play.c +++ b/AUTh Courses/Parallel and Distributed Systems/02-gameoflife/game-of-life-parallel/src/play.c @@ -76,7 +76,12 @@ void play (int *board, int *newboard, int N, int M, int MPIRank, int MPISize) { MPI_Wait(&bottom_recv_request, &mpistat); calculateRow(board, newboard, N , M, 0, top_recv); calculateRow(board, newboard, N , M, N-1, bottom_recv); - + + /*Swap the board in main after the play + int *temp = newboard; + newboard = board; + board = temp;*/ + /* COPY the new board back into the old board */ for (i=0; i