Push new data to all nodes from Task 2
This commit is contained in:
parent
1e2f5ca9ad
commit
bf397e3996
BIN
build/ag_gen
BIN
build/ag_gen
Binary file not shown.
@ -286,23 +286,15 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
|
||||
instance.facts.hash_table[new_state.compound_assign(fact)]=instance.facts.size();
|
||||
instance.facts.length++;
|
||||
instance.facts.str_vector.push_back(new_state.compound_assign(fact));
|
||||
//Update ALL nodes (include ttwo_comm nodes) with new data
|
||||
for (int w = 0; w < world.size(); w++)
|
||||
{
|
||||
if(w < 1 + alloc && w > two_alloc)
|
||||
if(w != world.rank())
|
||||
{
|
||||
world.isend(w, 3, new_state);
|
||||
world.isend(w, 4, fact);
|
||||
}
|
||||
}
|
||||
//Update ttwo_comm Nodes
|
||||
if (ttwo_comm.size() > 1){
|
||||
for (int t = 0; t < ttwo_comm.size(); t++){
|
||||
if (t != ttwo_comm.rank()){
|
||||
ttwo_comm.isend(t, 3, new_state);
|
||||
ttwo_comm.isend(t, 4, fact);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user