limo1996 / sat-solver Goto Github PK
View Code? Open in Web Editor NEWParallel SAT Solver
Parallel SAT Solver
One of the main questions of the professors was:
"Why are the dots so spread for larger formulas?"
We should be able to answer that question in a "scientific" way, i.e. something like this:
"The formula on the top of the plot is very difficult to solve, the dpll algorithm needs to make 25 branching steps until it is able to solve the formula.
On the other hand the formula on the bottom is very easy to solve, the dpll algorithm doesn't need to branch at all".
We should come up with a numerical representation of the difficulty of a formula, one suggestion (used above) is to use the maximal branching depth until a solution is found or unsat is proven.
Note that that does not mean we can just count the number of "branches" taken during an execution, we need to associate true and false branches on the same variable and count them as one.
Effectively we need to find the depth of the tree.
But counting the number of branches in total would also be a metric, it would tell us how "bad" the decisions that our algorithm made are. I would suggest we do both...
A good starting point is to change the stderr output in dpll.cpp such that we record the necessary information.
We could then create a python script that reads the stderr output and comes up with the branching depth and the overall number of taken branches.
I suggest that we just do it on the sequential version, as it will be identical to the parallel one (this is a property of the cnf formula).
Looks like our DPLL is not working...
fail_example1.cnf and fail_example2.cnf are examples of such behavior...
encode the cnf formulas as integer arrays and boolean arrays instead of using object structures -> should require a lot less space -> better spacial locality -> faster!
We should store some runtime measurements in files on euler.
Such that one can then manually download them, run a script and get a nice plot (x-axis: size of formula i.e. number of variables, y-axis: runtime)
There are 3 changes necessary as far as I can see:
Additionally we should have far more and far larger formulas! -> #8
Whenever I try to run something on Euler on more than 48 cores I get the following error message:
virtual.40d: Queue has been closed. Job not submitted.
Weird...
Here's the full output of main.py:
please enter your nethz_account name : ebjan
Euler parameters:
num_nodes: [16, 64, 128]
num_runs: 4
timeout: 15 [seconds]
max_overall_runtime: 240 [minutes]
test_folder: 3-sat_instances_medium
[email protected]'s password: *
to_euler.tar 100% 1860KB 1.8MB/s 00:00
Pseudo-terminal will not be allocated because stdin is not a terminal.
[email protected]'s password: *
Generic job.
virtual.40d: Queue has been closed. Job not submitted.
#########################################################
unpacking tar archive...
calling run_me_on_euler.sh...
#########################################################
run_me_on_euler.sh is taking over
including necessary modules...
node counts: 16 64 128
choosing highest node count: 128
submitting compilation and run job to the batch system...
an error occurred during job submission, exiting
#########################################################
in Variable.cpp/Variable.h
Is it valid to have more than one CNF in a file? Parser seems to be able to parse multiple CNFs from one file...
If we want to get more overall performance we should implement CDCL!
We should add an option to the plotting script to add numbers to identify formulas.
An idea on how this might look like:
https://stackoverflow.com/questions/14432557/matplotlib-scatter-plot-with-different-text-at-each-data-point
We should add a command line option to the plotting script that enables the numbers.
For command line option parsing one could use the click python package, example usage is in main.py.
Create a google slides presentation.
I think it should cover the following aspects:
As discussed we should iprobe on a different tag.
The exception that I planted seems to be triggered in a couple of cases (13 times out of 840 executions).
Here's the output file from euler:
lsf.o52407426
We need more test-cases!
Small ones and also large ones.
We should store them in the repository such that everyone can run the same tests.
2 things:
Jan, I think it would be better to move encoding and parsing of formula to CNF class so I can reuse it in Master class (I need to parse final formula and print it). I will push in few minutes data class named State that basically hold array of unsigned ints and its size + getter and setter.
Your methods can looks like:
State CNF::encode(); //cnf will encode itself to State object
CNF cnf = new CNF(State state); // cnf will parse itself from State object
// ---- or -----
CNF cnf = new CNF();
cnf.parse(State state);
What do you think about that?
We have too much folders in main folder. After Mondays presentation we should move all tests to common test folder, rename python_wrapper to scrips, move randomCNF to scripts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.