From bd02e583839ec77abaf9ee2f5ba7e040ac888e4c Mon Sep 17 00:00:00 2001 From: YuhangQ Date: Sun, 9 Apr 2023 18:17:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E5=88=9D=E7=89=88=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.sh | 2 +- src/workers/sharer.cpp | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/run.sh b/run.sh index 12d7f5e..045241b 100755 --- a/run.sh +++ b/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 \ No newline at end of file +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 \ No newline at end of file diff --git a/src/workers/sharer.cpp b/src/workers/sharer.cpp index 85bd068..c3ebce8 100644 --- a/src/workers/sharer.cpp +++ b/src/workers/sharer.cpp @@ -119,8 +119,6 @@ bool receive_clauses_from_last_node(vec &clauses) { return received; } - - void sharer::clause_sharing_init() { MPI_Comm_size(MPI_COMM_WORLD, &num_procs); MPI_Comm_rank(MPI_COMM_WORLD, &rank); @@ -170,14 +168,14 @@ 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(); } }