diff --git a/build/ag_gen b/build/ag_gen index fffc49f..a6ded4b 100755 Binary files a/build/ag_gen and b/build/ag_gen differ diff --git a/src/ag_gen/ag_gen.cpp b/src/ag_gen/ag_gen.cpp index 06b8539..52916f3 100755 --- a/src/ag_gen/ag_gen.cpp +++ b/src/ag_gen/ag_gen.cpp @@ -449,7 +449,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, //Execute Task 2 //if(world.rank() == send_check(world, alloc) && world.rank() <= send_check(world, 2*two_alloc)) - if(world.rank() == send_check(world, alloc) && world.rank() <= (2*two_alloc)) + if(world.rank() >= send_check(world, alloc) && world.rank() <= (2*two_alloc)) { //Execute Task 2 struct timeval t21,t22; @@ -467,7 +467,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, if(ttwo_comm.rank() == 0){ for (int w = 0; w < world.size(); w++) { - if(w != world.rank() && w > send_check(world, 2*two_alloc)) + if(w < world.rank() || w > (2*two_alloc)) { world.isend(w, 2, 1); } @@ -527,6 +527,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, //Receive the message so it doesn't just sit there int ttwo_done; world.recv(mpi::any_source, 2, ttwo_done); + std::cout << "Else nodes received task 2 completion message." << std::endl; } //Task Four