diff --git a/src/load_balance_schemes.c b/src/load_balance_schemes.c index 8ca36896aec53f3bfa6b4c97889f625feffffc31..156a12df9e22fce1b7ca3efab18059fe1c57526f 100644 --- a/src/load_balance_schemes.c +++ b/src/load_balance_schemes.c @@ -290,6 +290,7 @@ void grr_main(thread_struct* thread_args_ptr) { int* recv_array; int msg_status_flag; int grr_counter; + int temp = 0; MPI_Request request_var; log("Starting GRR main."); @@ -343,6 +344,9 @@ void grr_main(thread_struct* thread_args_ptr) { msg_status_flag = 0; MPI_Iprobe(grr_index, tag_grr_query, MPI_COMM_WORLD, &msg_status_flag, MPI_STATUS_IGNORE); if (msg_status_flag == 1) { + // Officially receive message. We don't care about contents though. + MPI_Recv(&temp, 1, MPI_INT, grr_index, tag_grr_query, MPI_COMM_WORLD, MPI_STATUS_IGNORE); + grr_counter = (grr_counter + 1) % thread_args_ptr->total_processors; while (grr_counter == 0 || grr_counter == grr_index) { grr_counter = (grr_counter + 1) % thread_args_ptr->total_processors;