diff --git a/docker/light b/docker/light index 1bb3c81..eaa530e 100755 Binary files a/docker/light and b/docker/light differ diff --git a/src/distributed/worker.hpp b/src/distributed/worker.hpp index 65681ca..3ebeff0 100644 --- a/src/distributed/worker.hpp +++ b/src/distributed/worker.hpp @@ -81,11 +81,6 @@ void worker_main(light* S, int num_procs, int rank) { } } - int flag; - if(MPI_Test(solved_request, &flag, MPI_STATUS_IGNORE) == MPI_SUCCESS && flag == 0) { - MPI_Cancel(solved_request); - } - } else if(res == 20) { int flag; int is_sat = 0; @@ -94,15 +89,5 @@ void worker_main(light* S, int num_procs, int rank) { // when unknown do nothing. } - int flag; - if(MPI_Test(model_request, &flag, MPI_STATUS_IGNORE) == MPI_SUCCESS && flag == 0) { - MPI_Cancel(model_request); - } - if(MPI_Test(&S->terminal_request, &flag, MPI_STATUS_IGNORE) == MPI_SUCCESS && flag == 0) { - MPI_Cancel(&S->terminal_request); - } - - //delete(S); - MPI_Barrier(MPI_COMM_WORLD); } \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index e454673..1f450b5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,7 +20,7 @@ int main(int argc, char **argv) { light* S = new light(); S->arg_parse(argc, argv); - // 初始化节点关系 + // 初始化环形节点关系 S->rank = rank; S->num_procs = num_procs; if(rank == 0) { diff --git a/src/solve.cpp b/src/solve.cpp index b95e3a1..5962171 100644 --- a/src/solve.cpp +++ b/src/solve.cpp @@ -164,10 +164,8 @@ int light::solve() { s->clause_sharing_init(); } - - while (!terminated) { - usleep(100000); + usleep(500000); if(OPT(share)) s->do_clause_sharing(); @@ -185,6 +183,9 @@ int light::solve() { terminate_workers(); } } + + if(OPT(share)) s->clause_sharing_end(); + // printf("ending solve\n"); // terminate_workers(); //important, need combine nps/dps !!!!!!!!!!!!!!!!