add lstech solver

This commit is contained in:
ihan-o 2023-05-05 13:40:50 +08:00
parent b3130ab03b
commit e8466070ec

View File

@ -68,7 +68,7 @@ void light::diversity_workers() {
workers[i]->configure("worker_index", i); workers[i]->configure("worker_index", i);
workers[i]->configure("worker_number", OPT(threads)); workers[i]->configure("worker_number", OPT(threads));
if(rank == 1) { if(rank == 1 || solver_type = LSTECH) {
workers[i]->configure("worker_seed", 0); workers[i]->configure("worker_seed", 0);
} else { } else {
workers[i]->configure("worker_seed", rank); workers[i]->configure("worker_seed", rank);
@ -113,7 +113,7 @@ void light::diversity_workers() {
if (OPT(shuffle)) { if (OPT(shuffle)) {
workers[i]->configure("worker_index", i); workers[i]->configure("worker_index", i);
workers[i]->configure("worker_number", OPT(threads)); workers[i]->configure("worker_number", OPT(threads));
if(rank == num_procs - 1) { if(rank == num_procs - 1 || solver_type = LSTECH) {
workers[i]->configure("worker_seed", 0); workers[i]->configure("worker_seed", 0);
} else { } else {
workers[i]->configure("worker_seed", rank); workers[i]->configure("worker_seed", rank);
@ -272,6 +272,9 @@ void light::seperate_groups() {
int unsat_procs = worker_procs / 4; int unsat_procs = worker_procs / 4;
int default_procs = worker_procs - sat_procs - unsat_procs; int default_procs = worker_procs - sat_procs - unsat_procs;
if (rank == 2 || rank == sat_procs + 2 || rank == sat_procs + unsat_procs + 2)
solver_type == LSTECH;
std::vector<int> tmp; std::vector<int> tmp;
// [1, sat_procs] for sat // [1, sat_procs] for sat
if(rank >= 1 && rank <= sat_procs) { if(rank >= 1 && rank <= sat_procs) {