Buffer variables
This commit is contained in:
parent
e639ade004
commit
52aed47d00
@ -1248,6 +1248,8 @@ AGGenInstance &AGGen::sg_generate(bool batch_process, int batch_num, int numThrd
|
|||||||
int state_count = 0;
|
int state_count = 0;
|
||||||
int first_loop = 1;
|
int first_loop = 1;
|
||||||
int msg_sends = 0;
|
int msg_sends = 0;
|
||||||
|
NetworkState buffer_state;
|
||||||
|
Quality buffer_fact;
|
||||||
|
|
||||||
std::random_device rd; // obtain a random number from hardware
|
std::random_device rd; // obtain a random number from hardware
|
||||||
std::mt19937 gen(rd()); // seed the generator
|
std::mt19937 gen(rd()); // seed the generator
|
||||||
@ -1445,14 +1447,16 @@ AGGenInstance &AGGen::sg_generate(bool batch_process, int batch_num, int numThrd
|
|||||||
instance.facts.hash_table[new_state.compound_assign(fact)]=instance.facts.size();
|
instance.facts.hash_table[new_state.compound_assign(fact)]=instance.facts.size();
|
||||||
instance.facts.length++;
|
instance.facts.length++;
|
||||||
instance.facts.str_vector.push_back(new_state.compound_assign(fact));
|
instance.facts.str_vector.push_back(new_state.compound_assign(fact));
|
||||||
|
buffer_state = new_state;
|
||||||
|
buffer_fact = fact;
|
||||||
|
|
||||||
//Update ALL nodes (include ttwo_comm nodes) with new data
|
//Update ALL nodes (include ttwo_comm nodes) with new data
|
||||||
for (int w = 0; w < world.size(); w++)
|
for (int w = 0; w < world.size(); w++)
|
||||||
{
|
{
|
||||||
if(w != world.rank() && w != 1)
|
if(w != world.rank() && w != 1)
|
||||||
{
|
{
|
||||||
mpi::request ns_req = world.isend(w, 5, new_state);
|
mpi::request ns_req = world.isend(w, 5, buffer_state);
|
||||||
mpi::request fact_req = world.isend(w, 6, fact);
|
mpi::request fact_req = world.isend(w, 6, buffer_fact);
|
||||||
//ns_req.wait();
|
//ns_req.wait();
|
||||||
//fact_req.wait();
|
//fact_req.wait();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user