Adjusting syncing and buffering

This commit is contained in:
Noah L. Schrick 2022-02-08 18:02:32 -06:00
parent 97e4ba4647
commit e639ade004

View File

@ -1281,11 +1281,6 @@ AGGenInstance &AGGen::sg_generate(bool batch_process, int batch_num, int numThrd
}
if (world.rank() > 1){
//Start Fresh each iteration
localFrontier.clear();
std::vector<Factbase>().swap(instance.factbases);
std::vector<Edge>().swap(instance.edges);
std::vector<FactbaseItems>().swap(instance.factbase_items);
//Check for finished signal
if(world.iprobe(0, 99)){
@ -1295,6 +1290,12 @@ AGGenInstance &AGGen::sg_generate(bool batch_process, int batch_num, int numThrd
//We get a new state and need to do work
if (world.iprobe(0, 1)){
//Start Fresh each iteration
localFrontier.clear();
std::vector<Factbase>().swap(instance.factbases);
std::vector<Edge>().swap(instance.edges);
std::vector<FactbaseItems>().swap(instance.factbase_items);
NetworkState current_state;
world.recv(0, 1, current_state);
state_count = 0;