可以使用的初版代码
This commit is contained in:
parent
87d7a1d448
commit
bd02e58383
2
run.sh
2
run.sh
@ -4,4 +4,4 @@
|
||||
|
||||
#valgrind
|
||||
|
||||
make -j 16 && mpirun -np 4 --allow-run-as-root ./light -i data/class_1_easy_10_0.cnf --share=1 --threads=32 --times=1000
|
||||
make -j 16 && mpirun -np 9 --allow-run-as-root ./light -i data/WS_500_16_70_10.apx_0.cnf --share=1 --threads=32 --times=1000
|
@ -119,8 +119,6 @@ bool receive_clauses_from_last_node(vec<clause_store*> &clauses) {
|
||||
return received;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void sharer::clause_sharing_init() {
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &num_procs);
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
@ -171,13 +169,13 @@ void sharer::do_clause_sharing() {
|
||||
}
|
||||
|
||||
//导入当前节点产生的子句
|
||||
int percent = sort_clauses(i);
|
||||
if (percent < 75) {
|
||||
producers[i]->broaden_export_limit();
|
||||
}
|
||||
else if (percent > 98) {
|
||||
producers[i]->restrict_export_limit();
|
||||
}
|
||||
// int percent = sort_clauses(i);
|
||||
// if (percent < 75) {
|
||||
// producers[i]->broaden_export_limit();
|
||||
// }
|
||||
// else if (percent > 98) {
|
||||
// producers[i]->restrict_export_limit();
|
||||
// }
|
||||
|
||||
for (int j = 0; j < consumers.size(); j++) {
|
||||
if (producers[i]->id == consumers[j]->id) continue;
|
||||
@ -186,7 +184,7 @@ void sharer::do_clause_sharing() {
|
||||
consumers[j]->import_clauses_from(cls);
|
||||
}
|
||||
for (int k = 0; k < cls.size(); k++) {
|
||||
cls[k]->free_clause();
|
||||
int res = cls[k]->free_clause();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user