Syncing repos

This commit is contained in:
Noah L. Schrick 2022-01-29 23:19:47 -06:00
parent f316e83962
commit 2a93d23cfb
2 changed files with 5 additions and 3 deletions

Binary file not shown.

View File

@ -148,7 +148,7 @@ void task_one(AGGenInstance &instance, NetworkState &current_state,\
skip_greatest = 1;
if(world.rank() <= alloc - skip_greatest){
world.isend(send_check(world, world.rank() + alloc -1), 30, appl_exploits);
world.isend(send_check(world, world.rank() + alloc -1), 0, current_state);
world.isend(send_check(world, world.rank() + alloc -1), 40, current_state);
}
}
@ -162,7 +162,7 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
std::vector<std::tuple<Exploit, AssetGroup>> appl_exploits;
world.recv(mpi::any_source, 30, appl_exploits);
world.recv(mpi::any_source, 0, current_state);
world.recv(mpi::any_source, 40, current_state);
std::cout << "Node " << world.rank() << " received Task 1 data." << std::endl;
@ -317,8 +317,10 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
auto hash_num = new_state.get_hash(instance.facts);
if (hash_num == current_hash)
if (hash_num == current_hash){
std::cout << "Same hash." << std::endl;
continue;
}
//<6 Node Edge Case Prevention: Node 0 unable to execute task 3
if(world.rank() != 0){