diff --git a/build/ag_gen b/build/ag_gen index baf90c3..05c51ee 100755 Binary files a/build/ag_gen and b/build/ag_gen differ diff --git a/src/main.cpp b/src/main.cpp index 4de234b..d476695 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -691,7 +691,6 @@ int main(int argc, char *argv[]) { AGGenInstance postinstance; - std::cout << "Generating Attack Graph: " << std::flush; AGGen gen(_instance);//use AGGen class to instantiate an obj with the name gen! _instance obj as the parameter! constructor defined in ag_gen.cpp if (mpi_subgraphing) diff --git a/src/mpi/tasks.cpp b/src/mpi/tasks.cpp index 5e405e9..a67a904 100644 --- a/src/mpi/tasks.cpp +++ b/src/mpi/tasks.cpp @@ -554,6 +554,23 @@ void state_merge(std::vector node_factbases, std::vector node_ed i_alpha = i_usage/tot_sys_mem; } } + + else{ + //Each MPI Node has its own copy of states and factbases: we need to correct it with the Root's IDs + auto old_id = fb.get_id(); + fb.reset_curr_id(last_known_id+1); + fb.set_id(); + auto new_id = fb.get_id(); + last_known_id = new_id; + for(auto ed: node_edges){ + if (ed.get_from_id() == old_id){ + ed.force_from_id(new_id); + } + if (ed.get_to_id() == old_id){ + ed.force_to_id(new_id); + } + } + } } //This does add duplicate edges - taken care of through graphviz' "strict" graphing