diff --git a/run.sh b/run.sh index ff36f2c..2ff9c54 100755 --- a/run.sh +++ b/run.sh @@ -27,6 +27,6 @@ INSTANCE=04157f716c1e9606c6a530657bf8f957-Kakuro-easy-125-ext.xml.hg_4.cnf # make -j 16 && mpirun --bind-to none -np 5 --allow-run-as-root ./light -i $DIR/$INSTANCE --share=1 --threads=4 --times=3600 -make -j 16 && mpirun --bind-to none -np 9 --allow-run-as-root ./light -i ./data/hard1.cnf --share=1 --threads=16 --times=3600 +make -j 16 && mpirun --bind-to none -np 9 --allow-run-as-root ./light -i ./data/class_1_easy_10_0.cnf --share=1 --threads=16 --times=3600 #./light -i $DIR/$INSTANCE --share=1 --threads=16 --times=3600 diff --git a/src/solve.cpp b/src/solve.cpp index fbf87e8..9876ca5 100644 --- a/src/solve.cpp +++ b/src/solve.cpp @@ -69,16 +69,13 @@ void light::init_workers() { void light::diversity_workers() { - int num_procs, rank; - MPI_Comm_size(MPI_COMM_WORLD, &num_procs); - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - for (int i = 0; i < OPT(threads); i++) { - if(worker_type == SAT) { - if (OPT(shuffle)) { - if (i) workers[i]->configure("order_reset", (rank - 1) * OPT(threads) + i); - } + if (OPT(shuffle)) { + if (i) workers[i]->configure("order_reset", (rank - 1) * OPT(threads) + i); + } + + if(worker_type == SAT) { workers[i]->configure("stable", 1); workers[i]->configure("target", 2); @@ -123,10 +120,6 @@ void light::diversity_workers() { else if (i == 14) workers[i]->configure("target", 2); } else { - - if (OPT(shuffle)) { - if (i) workers[i]->configure("order_reset", i); - } if (OPT(pakis)) { if (i == 13 || i == 14 || i == 9) @@ -163,9 +156,7 @@ void light::diversity_workers() { else workers[i]->configure("phase", 1); } - } - for (int j = 0; j < configure_name[i].size(); j++) { workers[i]->configure(configure_name[i][j], configure_val[i][j]);