更新RS,第一个node和最后一个node初始排列为 1~n
This commit is contained in:
parent
5effc89c11
commit
de434abbfb
@ -1,17 +1,17 @@
|
|||||||
all:
|
all:
|
||||||
$(MAKE) -C "/home/chenzh/solvers/cloud-sat/kissat-inc/build"
|
$(MAKE) -C "/pub/netdisk1/qianyh/Light/kissat-inc/build"
|
||||||
kissat:
|
kissat:
|
||||||
$(MAKE) -C "/home/chenzh/solvers/cloud-sat/kissat-inc/build" kissat
|
$(MAKE) -C "/pub/netdisk1/qianyh/Light/kissat-inc/build" kissat
|
||||||
tissat:
|
tissat:
|
||||||
$(MAKE) -C "/home/chenzh/solvers/cloud-sat/kissat-inc/build" tissat
|
$(MAKE) -C "/pub/netdisk1/qianyh/Light/kissat-inc/build" tissat
|
||||||
clean:
|
clean:
|
||||||
rm -f "/home/chenzh/solvers/cloud-sat/kissat-inc"/makefile
|
rm -f "/pub/netdisk1/qianyh/Light/kissat-inc"/makefile
|
||||||
-$(MAKE) -C "/home/chenzh/solvers/cloud-sat/kissat-inc/build" clean
|
-$(MAKE) -C "/pub/netdisk1/qianyh/Light/kissat-inc/build" clean
|
||||||
rm -rf "/home/chenzh/solvers/cloud-sat/kissat-inc/build"
|
rm -rf "/pub/netdisk1/qianyh/Light/kissat-inc/build"
|
||||||
coverage:
|
coverage:
|
||||||
$(MAKE) -C "/home/chenzh/solvers/cloud-sat/kissat-inc/build" coverage
|
$(MAKE) -C "/pub/netdisk1/qianyh/Light/kissat-inc/build" coverage
|
||||||
indent:
|
indent:
|
||||||
$(MAKE) -C "/home/chenzh/solvers/cloud-sat/kissat-inc/build" indent
|
$(MAKE) -C "/pub/netdisk1/qianyh/Light/kissat-inc/build" indent
|
||||||
test:
|
test:
|
||||||
$(MAKE) -C "/home/chenzh/solvers/cloud-sat/kissat-inc/build" test
|
$(MAKE) -C "/pub/netdisk1/qianyh/Light/kissat-inc/build" test
|
||||||
.PHONY: all clean coverage indent kissat test tissat
|
.PHONY: all clean coverage indent kissat test tissat
|
||||||
|
@ -67,12 +67,15 @@ void kissat_init_shuffle(kissat * solver, int maxvar) {
|
|||||||
id = (int *)malloc(sizeof(int) * (maxvar + 1));
|
id = (int *)malloc(sizeof(int) * (maxvar + 1));
|
||||||
for (int i = 1; i <= maxvar; i++)
|
for (int i = 1; i <= maxvar; i++)
|
||||||
id[i] = i;
|
id[i] = i;
|
||||||
for (int i = 1; i <= maxvar; i++)
|
|
||||||
{
|
if(seed != 0) {
|
||||||
int j = (rand_r(&seed) % maxvar) + 1;
|
for (int i = 1; i <= maxvar; i++)
|
||||||
int x = id[i];
|
{
|
||||||
id[i] = id[j];
|
int j = (rand_r(&seed) % maxvar) + 1;
|
||||||
id[j] = x;
|
int x = id[i];
|
||||||
|
id[i] = id[j];
|
||||||
|
id[j] = x;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int block_size = maxvar / number;
|
int block_size = maxvar / number;
|
||||||
|
20
run.sh
20
run.sh
@ -1,27 +1,23 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# cd kissat-inc
|
cd kissat-inc
|
||||||
# make clean
|
make clean
|
||||||
# ./configure
|
./configure
|
||||||
# make -j 64
|
make -j 64
|
||||||
# cd ..
|
cd ..
|
||||||
# make clean
|
make clean
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# buglist
|
# buglist
|
||||||
# - fe96b630b3e761821308b544368dd521-GP_100_950_34.cnf
|
# - fe96b630b3e761821308b544368dd521-GP_100_950_34.cnf
|
||||||
# - 0d4970edf84353e5a5798bca3f7f270e-SAT_H_instances_childsnack_p10.hddl_2.cnf
|
# - 0d4970edf84353e5a5798bca3f7f270e-SAT_H_instances_childsnack_p10.hddl_2.cnf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 这个存在问题
|
# 这个存在问题
|
||||||
DIR=/pub/data/chenzh/data/sat2022
|
DIR=/pub/data/chenzh/data/sat2022
|
||||||
INSTANCE=0d4970edf84353e5a5798bca3f7f270e-SAT_H_instances_childsnack_p10.hddl_2.cnf
|
INSTANCE=30ca21da9753263cc8cda020802b58ce-GP_500_200_20.cnf
|
||||||
|
|
||||||
|
|
||||||
# make -j 16 && mpirun --bind-to none -np 9 --allow-run-as-root ./light -i $DIR/$INSTANCE --shuffle=1 --share=1 --threads=16 --times=3600 --share_method=1
|
# make -j 16 && mpirun --bind-to none -np 9 --allow-run-as-root ./light -i $DIR/$INSTANCE --shuffle=1 --share=1 --threads=16 --times=3600 --share_method=1
|
||||||
|
|
||||||
make -j 16 && mpirun --bind-to none -np 9 --allow-run-as-root ./light -i $DIR/$INSTANCE --share=1 --threads=16 --times=3600 --share_method=0
|
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 --share_method=0
|
||||||
|
|
||||||
#./light -i $DIR/$INSTANCE --share=1 --threads=16 --times=3600
|
#./light -i $DIR/$INSTANCE --share=1 --threads=16 --times=3600
|
||||||
|
@ -47,6 +47,7 @@ public:
|
|||||||
sharer* s;
|
sharer* s;
|
||||||
std::vector<std::vector<int>> sharing_groups;
|
std::vector<std::vector<int>> sharing_groups;
|
||||||
enum { SAT, UNSAT, DEFAULT } worker_type;
|
enum { SAT, UNSAT, DEFAULT } worker_type;
|
||||||
|
int worker_rs;
|
||||||
|
|
||||||
MPI_Request terminal_request;
|
MPI_Request terminal_request;
|
||||||
|
|
||||||
|
@ -54,13 +54,19 @@ void light::init_workers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void light::diversity_workers() {
|
void light::diversity_workers() {
|
||||||
|
|
||||||
for (int i = 0; i < OPT(threads); i++) {
|
for (int i = 0; i < OPT(threads); i++) {
|
||||||
if(worker_type == SAT) {
|
if(worker_type == SAT) {
|
||||||
|
|
||||||
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));
|
||||||
workers[i]->configure("worker_seed", rank);
|
|
||||||
|
if(rank == 1 || rank == num_procs - 1) {
|
||||||
|
workers[i]->configure("worker_seed", 0);
|
||||||
|
} else {
|
||||||
|
workers[i]->configure("worker_seed", rank);
|
||||||
|
}
|
||||||
// printf("r1: %d, r2: %d, r3: %d\n", r1, r2, r3);
|
// printf("r1: %d, r2: %d, r3: %d\n", r1, r2, r3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user