同步代码
This commit is contained in:
parent
2080eb5e37
commit
87d7a1d448
BIN
docker/light
BIN
docker/light
Binary file not shown.
@ -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) {
|
} else if(res == 20) {
|
||||||
int flag;
|
int flag;
|
||||||
int is_sat = 0;
|
int is_sat = 0;
|
||||||
@ -94,15 +89,5 @@ void worker_main(light* S, int num_procs, int rank) {
|
|||||||
// when unknown do nothing.
|
// 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);
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
}
|
}
|
@ -20,7 +20,7 @@ int main(int argc, char **argv) {
|
|||||||
light* S = new light();
|
light* S = new light();
|
||||||
S->arg_parse(argc, argv);
|
S->arg_parse(argc, argv);
|
||||||
|
|
||||||
// 初始化节点关系
|
// 初始化环形节点关系
|
||||||
S->rank = rank;
|
S->rank = rank;
|
||||||
S->num_procs = num_procs;
|
S->num_procs = num_procs;
|
||||||
if(rank == 0) {
|
if(rank == 0) {
|
||||||
|
@ -164,10 +164,8 @@ int light::solve() {
|
|||||||
s->clause_sharing_init();
|
s->clause_sharing_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while (!terminated) {
|
while (!terminated) {
|
||||||
usleep(100000);
|
usleep(500000);
|
||||||
|
|
||||||
if(OPT(share)) s->do_clause_sharing();
|
if(OPT(share)) s->do_clause_sharing();
|
||||||
|
|
||||||
@ -185,6 +183,9 @@ int light::solve() {
|
|||||||
terminate_workers();
|
terminate_workers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(OPT(share)) s->clause_sharing_end();
|
||||||
|
|
||||||
// printf("ending solve\n");
|
// printf("ending solve\n");
|
||||||
// terminate_workers(); //important, need combine nps/dps !!!!!!!!!!!!!!!!
|
// terminate_workers(); //important, need combine nps/dps !!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user