0% found this document useful (0 votes)
84 views85 pages

Mira XT

MiraXT - A Multi-Threaded SAT Solver Parallel SAT Solving Parallel SAT solving in theory is simple divide the search space and use multiple sequential SAT solvers However, there are some important issues How to divide the search space? use decision variables as splitting points But which one? From which process / thread? Efficient communication for control and synchronization Requesting subproblems Sharing conflict clauses.

Uploaded by

Ricardo Marques
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views85 pages

Mira XT

MiraXT - A Multi-Threaded SAT Solver Parallel SAT Solving Parallel SAT solving in theory is simple divide the search space and use multiple sequential SAT solvers However, there are some important issues How to divide the search space? use decision variables as splitting points But which one? From which process / thread? Efficient communication for control and synchronization Requesting subproblems Sharing conflict clauses.

Uploaded by

Ricardo Marques
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

MiraXT A Multi-Threaded SAT Solver

Tobias Schubert Natalia Kalinnik Matthew Lewis Bernd Becker

Institute of Computer Science Albert-Ludwigs-University of Freiburg Germany

10th International Conference on Theory and Applications of Satisability Testing

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

1 / 35

Outline
1 2 3

Parallel SAT Solving Related Work MiraXT Shared Clause Database Watched Literal Reference List Conict Clause Sharing Master Control Object Other Features Experimental Results Summary & Future Work

4 5

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

2 / 35

Parallel SAT Solving


Parallel SAT solving in theory is simple
Divide the search space and use multiple sequential SAT solvers

However, there are some important issues


How to divide the search space?
Use decision variables as splitting points But which one? From which process/thread?

Efcient communication for control and synchronization


Requesting subproblems Sharing conict clauses Signalling SAT/UNSAT

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

3 / 35

Parallel SAT Solving


Parallel SAT solving in theory is simple
Divide the search space and use multiple sequential SAT solvers

However, there are some important issues


How to divide the search space?
Use decision variables as splitting points But which one? From which process/thread?

Efcient communication for control and synchronization


Requesting subproblems Sharing conict clauses Signalling SAT/UNSAT

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

3 / 35

Related Work

Existing parallel SAT solvers


PSATO, //Satz, GridSAT, PaMira, PaSAT, ySAT All these solvers are based on the Davis-Putnam method But they focus on different hardware environments
Workstations connected by ethernet Multi-core and multi-CPU workstations

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

4 / 35

Related Work
Approaches for workstations connected by ethernet
PSATO, //Satz, GridSAT, PaMira Highly scalable
100s of workstations can be used in parallel

Loose integration of the SAT solving units Based on a master/client model Each client maintains its own clause database Communication is done with message passing
Relatively slow form of communication Signicant overhead for every message

Due to message passing limitations


Only clauses with a few literals are shared Conict clauses are often sent in bundles Clients choose the clauses they want to share

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

5 / 35

Related Work
Approaches for workstations connected by ethernet
PSATO, //Satz, GridSAT, PaMira Highly scalable
100s of workstations can be used in parallel

Loose integration of the SAT solving units Based on a master/client model Each client maintains its own clause database Communication is done with message passing
Relatively slow form of communication Signicant overhead for every message

Due to message passing limitations


Only clauses with a few literals are shared Conict clauses are often sent in bundles Clients choose the clauses they want to share

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

5 / 35

Related Work

Clause Database SAT Solver Client 0 Master Process Clause Database SAT Solver Client 1 PaMira: 1 Master, 4 Clients

Clause Database SAT Solver Client 2

Clause Database SAT Solver Client 3

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

6 / 35

Related Work

Clause Database SAT Solver Client 0

Message Passing

Clause Database SAT Solver Client 2

Master Process Clause Database SAT Solver Client 1 PaMira: 1 Master, 4 Clients Clause Database SAT Solver Client 3

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

6 / 35

Related Work

Approaches for multi-core and multi-CPU workstations


PaSAT, ySAT Thread-based implementations Tight integration of the SAT solving units Shared memory for communication & clause database
Provides high bandwidth, low latency, low overhead communication

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

7 / 35

Related Work
ySAT (Feldman, Dershowitz, Hanna, PDMC 2004)
Shared clause database
Contains all clauses of the original CNF formula (read-only)

Master control object


Maintains a list of unevaluated subproblems
Subproblems are not generated on demand No. of subproblems is always kept around some threshold Waiting threads pick one of the available subproblems

Provides a clause store for exchanging conict clauses


Contains all conict clauses generated by all threads Threads choose new clauses based on their current search state Selected clauses are copied into the threads local databases

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

8 / 35

Related Work
ySAT (Feldman, Dershowitz, Hanna, PDMC 2004)
Shared clause database
Contains all clauses of the original CNF formula (read-only)

Master control object


Maintains a list of unevaluated subproblems
Subproblems are not generated on demand No. of subproblems is always kept around some threshold Waiting threads pick one of the available subproblems

Provides a clause store for exchanging conict clauses


Contains all conict clauses generated by all threads Threads choose new clauses based on their current search state Selected clauses are copied into the threads local databases

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

8 / 35

Related Work
ySAT (Feldman, Dershowitz, Hanna, PDMC 2004)
Shared clause database
Contains all clauses of the original CNF formula (read-only)

Master control object


Maintains a list of unevaluated subproblems
Subproblems are not generated on demand No. of subproblems is always kept around some threshold Waiting threads pick one of the available subproblems

Provides a clause store for exchanging conict clauses


Contains all conict clauses generated by all threads Threads choose new clauses based on their current search state Selected clauses are copied into the threads local databases

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

8 / 35

Related Work
Clauses of the original CNF formula (readonly)

Conflict Clauses SAT Solver Thread 0

Conflict Clauses SAT Solver Thread 1

Conflict Clauses SAT Solver Thread 2

Conflict Clauses SAT Solver Thread 3

Master Control Object

Available Subproblems

Clause Store

ySAT: 1 Process, 4 Threads


Tobias Schubert (University of Freiburg) MiraXT A Multi-Threaded SAT Solver May 31, 2007 9 / 35

MiraXT
Design Goals
Focus on multi-CPU and multi-core workstations Thread-based implementation One clause database containing all inital and conict clauses Efcient exchange of conict clauses Generation of subproblems on demand Master control object
Signalling SAT/UNSAT Requesting subproblems

Competitive single-threaded performance

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

10 / 35

MiraXT

Shared Clause Database (readonly)

SAT Solver Thread 0 SAT Solver Thread 1 MiraXT: 1 Process, 4 Threads

Master Control Object

SAT Solver Thread 2 SAT Solver Thread 3

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

11 / 35

Outline
1 2 3

Parallel SAT Solving Related Work MiraXT Shared Clause Database Watched Literal Reference List Conict Clause Sharing Master Control Object Other Features Experimental Results Summary & Future Work

4 5

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

12 / 35

Shared Clause Database

What do we need from the shared clause database?


Fast insertion of new clauses
Lock required for inserting a pointer & initializing some ags

Unimpeded use of clauses by BCP procedure


All clauses are read-only

Support of conict clause sharing


Lock required for updating a pointer

Fast independent deletion of conict clauses


No lock required when removing references to clauses locally Lock required when deleting clauses from the clause database

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

13 / 35

Shared Clause Database

What do we need from the shared clause database?


Fast insertion of new clauses
Lock required for inserting a pointer & initializing some ags

Unimpeded use of clauses by BCP procedure


All clauses are read-only

Support of conict clause sharing


Lock required for updating a pointer

Fast independent deletion of conict clauses


No lock required when removing references to clauses locally Lock required when deleting clauses from the clause database

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

13 / 35

Shared Clause Database

What do we need from the shared clause database?


Fast insertion of new clauses
Lock required for inserting a pointer & initializing some ags

Unimpeded use of clauses by BCP procedure


All clauses are read-only

Support of conict clause sharing


Lock required for updating a pointer

Fast independent deletion of conict clauses


No lock required when removing references to clauses locally Lock required when deleting clauses from the clause database

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

13 / 35

Shared Clause Database

What do we need from the shared clause database?


Fast insertion of new clauses
Lock required for inserting a pointer & initializing some ags

Unimpeded use of clauses by BCP procedure


All clauses are read-only

Support of conict clause sharing


Lock required for updating a pointer

Fast independent deletion of conict clauses


No lock required when removing references to clauses locally Lock required when deleting clauses from the clause database

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

13 / 35

Shared Clause Database


Overall Design

Shared Clause Database

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

14 / 35

Shared Clause Database


Overall Design

Shared Clause Database

Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

14 / 35

Shared Clause Database


Overall Design

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

14 / 35

Shared Clause Database


Overall Design

Shared Clause Database

"New" Clauses

SAT Solver Thread 0 SAT Solver Thread 1


"Old" Clauses

Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

14 / 35

Shared Clause Database


Overall Design

Shared Clause Database

"New" Clauses

SAT Solver Thread 0 SAT Solver Thread 1


"Old" Clauses

Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

14 / 35

Outline
1 2 3

Parallel SAT Solving Related Work MiraXT Shared Clause Database Watched Literal Reference List Conict Clause Sharing Master Control Object Other Features Experimental Results Summary & Future Work

4 5

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

15 / 35

Watched Literal Reference List


How to realize the WL scheme in a multi-threaded SAT solver?
Clauses are dened to be read-only
No lock contention, no waiting times

WLs are stored locally by the threads

Watched Literal Reference List (WLRL)


WLRL contains a partial local copy of every clause a thread is currently using
Both watched literals Cache variable (CV) Pointer to the correspondig clause

CV is the rst choice when searching for a new WL CV is the old WL if the WL is replaced

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

16 / 35

Watched Literal Reference List


How to realize the WL scheme in a multi-threaded SAT solver?
Clauses are dened to be read-only
No lock contention, no waiting times

WLs are stored locally by the threads

Watched Literal Reference List (WLRL)


WLRL contains a partial local copy of every clause a thread is currently using
Both watched literals Cache variable (CV) Pointer to the correspondig clause

CV is the rst choice when searching for a new WL CV is the old WL if the WL is replaced

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

16 / 35

Watched Literal Reference List


Overall Design

Shared Clause Database

SAT Solver Thread WLRL WL0 WL0 WL1 WL1 CV CV

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

17 / 35

Outline
1 2 3

Parallel SAT Solving Related Work MiraXT Shared Clause Database Watched Literal Reference List Conict Clause Sharing Master Control Object Other Features Experimental Results Summary & Future Work

4 5

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

18 / 35

Conict Clause Sharing


Conict analysis & clause recording in a sequential SAT solver
In case of a conict a sequential SAT solver
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Determines the backtrack level Continues the search process

Conict analysis & clause recording in MiraXT


In case of a conict each thread
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Checks for new clauses within the shared clause database Integrates all short and conicting clauses into its own context
Multiple calls of the conict analysis routine & backtrack operations

Continues the search process

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

19 / 35

Conict Clause Sharing


Conict analysis & clause recording in a sequential SAT solver
In case of a conict a sequential SAT solver
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Determines the backtrack level Continues the search process

Conict analysis & clause recording in MiraXT


In case of a conict each thread
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Checks for new clauses within the shared clause database Integrates all short and conicting clauses into its own context
Multiple calls of the conict analysis routine & backtrack operations

Continues the search process

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

19 / 35

Conict Clause Sharing


Conict analysis & clause recording in a sequential SAT solver
In case of a conict a sequential SAT solver
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Determines the backtrack level Continues the search process

Conict analysis & clause recording in MiraXT


In case of a conict each thread
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Checks for new clauses within the shared clause database Integrates all short and conicting clauses into its own context
Multiple calls of the conict analysis routine & backtrack operations

Continues the search process

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

19 / 35

Conict Clause Sharing


Conict analysis & clause recording in a sequential SAT solver
In case of a conict a sequential SAT solver
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Determines the backtrack level Continues the search process

Conict analysis & clause recording in MiraXT


In case of a conict each thread
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Checks for new clauses within the shared clause database Integrates all short and conicting clauses into its own context
Multiple calls of the conict analysis routine & backtrack operations

Continues the search process

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

19 / 35

Conict Clause Sharing


Conict analysis & clause recording in a sequential SAT solver
In case of a conict a sequential SAT solver
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Determines the backtrack level Continues the search process

Conict analysis & clause recording in MiraXT


In case of a conict each thread
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Checks for new clauses within the shared clause database Integrates all short and conicting clauses into its own context
Multiple calls of the conict analysis routine & backtrack operations

Continues the search process

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

19 / 35

Conict Clause Sharing


Conict analysis & clause recording in a sequential SAT solver
In case of a conict a sequential SAT solver
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Determines the backtrack level Continues the search process

Conict analysis & clause recording in MiraXT


In case of a conict each thread
1 2 3 4

Performs conict analysis Adds the deduced conict clause to the clause database Checks for new clauses within the shared clause database Integrates all short and conicting clauses into its own context
Multiple calls of the conict analysis routine & backtrack operations

Continues the search process

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

19 / 35

Conict Clause Sharing


Adding conict clauses to the shared clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

20 / 35

Conict Clause Sharing


Adding conict clauses to the shared clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

20 / 35

Conict Clause Sharing


Adding conict clauses to the shared clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

20 / 35

Conict Clause Sharing


Adding conict clauses to the shared clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

20 / 35

Conict Clause Sharing


Checking for new clauses within the clause database

Shared Clause Database

"New" Clauses

SAT Solver Thread 0 SAT Solver Thread 1


"Old" Clauses

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

21 / 35

Conict Clause Sharing


Checking for new clauses within the clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

21 / 35

Conict Clause Sharing


Checking for new clauses within the clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

21 / 35

Conict Clause Sharing


Checking for new clauses within the clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

21 / 35

Conict Clause Sharing


Checking for new clauses within the clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

21 / 35

Conict Clause Sharing


Checking for new clauses within the clause database

Shared Clause Database

SAT Solver Thread 0 SAT Solver Thread 1

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

21 / 35

Conict Clause Sharing


Checking for new clauses within the clause database

Shared Clause Database

SAT Solver Thread 0 WLRL WL0 WL0 WL1 WL1 CV CV

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

21 / 35

Outline
1 2 3

Parallel SAT Solving Related Work MiraXT Shared Clause Database Watched Literal Reference List Conict Clause Sharing Master Control Object Other Features Experimental Results Summary & Future Work

4 5

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

22 / 35

Master Control Object


Overview
All communication is done in a passive way
Threads poll two simple Boolean ags to check for new events
SAT/UNSAT Waiting threads

What objects does the master control object contain?


Decision Stack Queue
Subproblem generation is done randomly & on demand First thread recognizing an idle thread donates a decision stack Splitting point = rst decision variable within the decision stack

Queue of sleeping threads


Idle threads are put to sleep so they dont waste CPU cycles Sleeping threads are served with new subproblems in the order they entered the queue

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

23 / 35

Master Control Object


Overview
All communication is done in a passive way
Threads poll two simple Boolean ags to check for new events
SAT/UNSAT Waiting threads

What objects does the master control object contain?


Decision Stack Queue
Subproblem generation is done randomly & on demand First thread recognizing an idle thread donates a decision stack Splitting point = rst decision variable within the decision stack

Queue of sleeping threads


Idle threads are put to sleep so they dont waste CPU cycles Sleeping threads are served with new subproblems in the order they entered the queue

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

23 / 35

Master Control Object


Overview
All communication is done in a passive way
Threads poll two simple Boolean ags to check for new events
SAT/UNSAT Waiting threads

What objects does the master control object contain?


Decision Stack Queue
Subproblem generation is done randomly & on demand First thread recognizing an idle thread donates a decision stack Splitting point = rst decision variable within the decision stack

Queue of sleeping threads


Idle threads are put to sleep so they dont waste CPU cycles Sleeping threads are served with new subproblems in the order they entered the queue

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

23 / 35

Outline
1 2 3

Parallel SAT Solving Related Work MiraXT Shared Clause Database Watched Literal Reference List Conict Clause Sharing Master Control Object Other Features Experimental Results Summary & Future Work

4 5

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

24 / 35

Other Features
Also integrated in MiraXT
Preprocessing
MiniSats preprocessing unit Unit Propagation Lookahead

Decision Heuristic
Similar to zChaffs VSIDS heuristic

Boolean Constraint Propagation


Implication Queue Sorting

Conict Analysis
Based on the 1UIP scheme

Restarts Conict Clause Deletion


Periodically the threads delete less active clauses Similar to the concept integrated in BerkMin

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

25 / 35

Other Features
Deletion of conict clauses
Shared Clause Database

SAT Solver Thread WLRL WL0 WL0 WL1 WL1 CV CV

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

26 / 35

Other Features
Deletion of conict clauses
Shared Clause Database

SAT Solver Thread WLRL WL0 WL0 WL1 WL1 CV CV

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

26 / 35

Other Features
Deletion of conict clauses
Shared Clause Database

SAT Solver Thread WLRL WL0 WL0 WL1 WL1 CV CV

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

26 / 35

Other Features
Deletion of conict clauses
Shared Clause Database

SAT Solver Thread WLRL

WL0

WL1

CV

Clause Clause Clause Clause Clause Clause Clause Clause

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

26 / 35

Other Features
Deletion of conict clauses
Shared Clause Database

SAT Solver Thread WLRL

Clause Clause Clause Clause Clause Clause Clause

WL0

WL1

CV

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

26 / 35

Experimental Results
Setup
A total of 120 Benchmarks were selected
SAT Race 2006 IBM 2004 BMC

CPU limit: 2000 seconds Dual-CPU workstation


2x Dual-Core AMD Opteron 280
2.4 GHz 2 MB L2 Cache (1 MB for each core) 2 GB RAM

Dual-core workstation
Intel Core 2 Duo E6400 2.13 GHz 2 MB L2 Cache (Intel Advanced Smart Cache) 1 GB RAM

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

27 / 35

Experimental Results
Setup
A total of 120 Benchmarks were selected
SAT Race 2006 IBM 2004 BMC

CPU limit: 2000 seconds Dual-CPU workstation


2x Dual-Core AMD Opteron 280
2.4 GHz 2 MB L2 Cache (1 MB for each core) 2 GB RAM

Dual-core workstation
Intel Core 2 Duo E6400 2.13 GHz 2 MB L2 Cache (Intel Advanced Smart Cache) 1 GB RAM

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

27 / 35

Experimental Results
Setup
A total of 120 Benchmarks were selected
SAT Race 2006 IBM 2004 BMC

CPU limit: 2000 seconds Dual-CPU workstation


2x Dual-Core AMD Opteron 280
2.4 GHz 2 MB L2 Cache (1 MB for each core) 2 GB RAM

Dual-core workstation
Intel Core 2 Duo E6400 2.13 GHz 2 MB L2 Cache (Intel Advanced Smart Cache) 1 GB RAM

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

27 / 35

Experimental Results
Dual-Core aMd opteron processor-based 2p server and workstation AMD Opteron 280 based Dual-CPU Workstation
High bandwidth, low power DDR2 memory Memory is directly connected Processors are directly Memory capacity scales with to processors numbers of processors connected to processors; cores are connected on die

RDDR2

with Direct Connect Architecture Separate memory and I/O paths designed to remove bus contention

AMD Opteron Processor

with Direct Connect Architecture HyperTransport technology link has ample bandwidth for I/O devices and x16 PCI-Express graphics

AMD Opteron Processor

RDDR2

On

PCI-X

PCI-X bridge1

PCI Express

PCI
GbE, SATA, IDE, USB, LPC, Etc. PCI-Express I/O expansion hub2 PCI-Express bridge and I/O hub2

Graphics Memory traffic I/O traffic IPC traffic

Dual PCI Express Graphics System supports full x16 bandwidth over dedicated HyperTransport links

direct connect architecture


Tobias Schubert (University of Freiburg) MiraXT A Multi-Threaded SAT Solver May 31, 2007 28 / 35

Experimental Results

Dual-Core AMD Opteron 280 based Dual-CPU Workstation


MiniSat2 1T Overall Runtime [s] Solved Instances #CC/s 64924.79 102 2043.24 68119.67 101 1604.92 MiraXT 2T 48384.57 109 3378.07 4T 39382.49 111 5850.05

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

29 / 35

Experimental Results

Dual-Core AMD Opteron 280 based Dual-CPU Workstation


MiniSat2 1T Overall Runtime [s] Solved Instances #CC/s 64924.79 102 2043.24 68119.67 101 1604.92 MiraXT 2T 48384.57 109 3378.07 4T 39382.49 111 5850.05

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

29 / 35

Experimental Results

Dual-Core AMD Opteron 280 based Dual-CPU Workstation


MiniSat2 1T Overall Runtime [s] Solved Instances #CC/s 64924.79 102 2043.24 68119.67 101 1604.92 MiraXT 2T 48384.57 109 3378.07 4T 39382.49 111 5850.05

#CC/s = no. of conict clauses generated per second

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

29 / 35

Experimental Results
Dual-Core AMD Opteron 280 based Dual-CPU Workstation
MiniSat2 1T Overall Runtime [s] Solved Instances #CC/s 64924.79 102 2043.24 68119.67 101 1604.92 MiraXT 2T 48384.57 109 3378.07 4T 39382.49 111 5850.05

Overall Speedup: 1.41


SAT Race 2006: 1.25 IBM 2004 BMC: 1.87

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

29 / 35

Experimental Results
Dual-Core AMD Opteron 280 based Dual-CPU Workstation
MiniSat2 1T Overall Runtime [s] Solved Instances #CC/s 64924.79 102 2043.24 68119.67 101 1604.92 MiraXT 2T 48384.57 109 3378.07 4T 39382.49 111 5850.05

Considering only instances solved by MiraXT, 1 Thread


Overall Speedup: 1.91
SAT Race 2006: 1.99 IBM 2004 BMC: 1.86

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

29 / 35

Experimental Results
Dual-Core AMD Opteron 280 based Dual-CPU Workstation
MiniSat2 1T Overall Runtime [s] Solved Instances #CC/s 64924.79 102 2043.24 68119.67 101 1604.92 MiraXT 2T 48384.57 109 3378.07 4T 39382.49 111 5850.05

Overall Speedup: 1.73


SAT Race 2006: 1.48 IBM 2004 BMC: 2.59

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

29 / 35

Experimental Results
Dual-Core AMD Opteron 280 based Dual-CPU Workstation
MiniSat2 1T Overall Runtime [s] Solved Instances #CC/s 64924.79 102 2043.24 68119.67 101 1604.92 MiraXT 2T 48384.57 109 3378.07 4T 39382.49 111 5850.05

Considering only instances solved by MiraXT, 1 Thread


Overall Speedup: 2.74
SAT Race 2006: 3.00 IBM 2004 BMC: 2.60

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

29 / 35

Experimental Results

Intel Core 2 Duo E6400


MiniSat2 Overall Runtime [s] Solved Instances #CC/s 56814.96 102 2637.30 MiraXT 1T 57649.03 103 2267.64 2T 109 3483.74

46650.78

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

30 / 35

Experimental Results

Intel Core 2 Duo E6400


MiniSat2 Overall Runtime [s] Solved Instances #CC/s 56814.96 102 2637.30 MiraXT 1T 57649.03 103 2267.64 2T 109 3483.74

46650.78

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

30 / 35

Experimental Results

Intel Core 2 Duo E6400


MiniSat2 Overall Runtime [s] Solved Instances #CC/s 56814.96 102 2637.30 MiraXT 1T 57649.03 103 2267.64 2T 109 3483.74

46650.78

#CC/s = no. of conict clauses generated per second

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

30 / 35

Experimental Results
Intel Core 2 Duo E6400
MiniSat2 Overall Runtime [s] Solved Instances #CC/s 56814.96 102 2637.30 MiraXT 1T 57649.03 103 2267.64 2T 109 3483.74

46650.78

Overall Speedup: 1.24


SAT Race 2006: 1.17 IBM 2004 BMC: 1.45

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

30 / 35

Experimental Results
Intel Core 2 Duo E6400
MiniSat2 Overall Runtime [s] Solved Instances #CC/s 56814.96 102 2637.30 MiraXT 1T 57649.03 103 2267.64 2T 109 3483.74

46650.78

Considering only instances solved by MiraXT, 1 Thread


Overall Speedup: 1.43
SAT Race 2006: 1.45 IBM 2004 BMC: 1.41

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

30 / 35

Summary & Future Work


Summary
Single-threaded performance is competitive with other SAT solvers Efcient data structures for multi-threaded SAT solving
Tight integration of the threads Only one shared clause database

Good scaling in terms of conict clauses generated per second Promising speedups in the multi-threaded mode

Future Work
Optimizing the sequential core SAT algorithm Implementing an intelligent subproblem generation mechanism Tuning the clause sharing parameters Integrating MiniSats preprocessing unit directly into MiraXT Combining MiraXT with message passing: PaMiraXT
Tobias Schubert (University of Freiburg) MiraXT A Multi-Threaded SAT Solver May 31, 2007 31 / 35

Summary & Future Work


Summary
Single-threaded performance is competitive with other SAT solvers Efcient data structures for multi-threaded SAT solving
Tight integration of the threads Only one shared clause database

Good scaling in terms of conict clauses generated per second Promising speedups in the multi-threaded mode

Future Work
Optimizing the sequential core SAT algorithm Implementing an intelligent subproblem generation mechanism Tuning the clause sharing parameters Integrating MiniSats preprocessing unit directly into MiraXT Combining MiraXT with message passing: PaMiraXT
Tobias Schubert (University of Freiburg) MiraXT A Multi-Threaded SAT Solver May 31, 2007 31 / 35

MiraXT with MiniSats Preprocessing Unit: Status Quo


MiniSat Initial CNF Formula Preprocessing
Modified CNF Formula

Model Extension
Shared Clause Database (readonly)

MiraXT

Complete Model (in case of SAT)

SAT Solver Thread 0

Master Control

SAT Solver Thread 2

SAT Solver Thread 1

Object

SAT Solver Thread 3

Partial Model (in case of SAT)

MiraXT with MiniSats Preprocessing Unit

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

32 / 35

Combining MiraXT with Message Passing: PaMiraXT


Problem
Which parallel SAT solver should we use if we have 4 workstations connected by ethernet, where each workstation itself is equipped with a quad-core CPU?

MiraXT
Can be executed as a parallel SAT engine with 4 threads on a single workstation but not on all 4 workstations in parallel

PaMira
Can be executed as a parallel SAT engine with 16 clients and 1 master on all 4 workstations in parallel Communication is completely done with message passing (even between clients located on the same quad-core CPU)
Tobias Schubert (University of Freiburg) MiraXT A Multi-Threaded SAT Solver May 31, 2007 33 / 35

Combining MiraXT with Message Passing: PaMiraXT


Problem
Which parallel SAT solver should we use if we have 4 workstations connected by ethernet, where each workstation itself is equipped with a quad-core CPU?

MiraXT
Can be executed as a parallel SAT engine with 4 threads on a single workstation but not on all 4 workstations in parallel

PaMira
Can be executed as a parallel SAT engine with 16 clients and 1 master on all 4 workstations in parallel Communication is completely done with message passing (even between clients located on the same quad-core CPU)
Tobias Schubert (University of Freiburg) MiraXT A Multi-Threaded SAT Solver May 31, 2007 33 / 35

Combining MiraXT with Message Passing: PaMiraXT


Problem
Which parallel SAT solver should we use if we have 4 workstations connected by ethernet, where each workstation itself is equipped with a quad-core CPU?

MiraXT
Can be executed as a parallel SAT engine with 4 threads on a single workstation but not on all 4 workstations in parallel

PaMira
Can be executed as a parallel SAT engine with 16 clients and 1 master on all 4 workstations in parallel Communication is completely done with message passing (even between clients located on the same quad-core CPU)
Tobias Schubert (University of Freiburg) MiraXT A Multi-Threaded SAT Solver May 31, 2007 33 / 35

Combining MiraXT with Message Passing: PaMiraXT

Clause Database SAT Solver Client 0 Master Process Clause Database SAT Solver Client 1 PaMira: 1 Master, 4 Clients

Clause Database SAT Solver Client 2

Clause Database SAT Solver Client 3

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

34 / 35

Combining MiraXT with Message Passing: PaMiraXT

Clause Database SAT Solver Client 0 Master Process Clause Database SAT Solver Client 1 PaMira: 1 Master, 4 Clients

Clause Database SAT Solver Client 2

Clause Database SAT Solver Client 3

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

34 / 35

Combining MiraXT with Message Passing: PaMiraXT

Shared Clause Database (readonly)

Shared Clause Database (readonly)

SAT Solver Thread 0

Master Control

SAT Solver Thread 2

SAT Solver Thread 0

Master Control

SAT Solver Thread 2

SAT Solver Thread 1

Object

SAT Solver Thread 3

SAT Solver Thread 1

Object

SAT Solver Thread 3

Client 0: MiraXT, 4 Threads

Client 2: MiraXT, 4 Threads

Client 1: MiraXT, 4 Threads


Shared Clause Database (readonly)

Master Process

Client 3: MiraXT, 4 Threads


Shared Clause Database (readonly)

SAT Solver Thread 0

Master Control

SAT Solver Thread 2

SAT Solver Thread 0

Master Control

SAT Solver Thread 2

SAT Solver Thread 1

Object

SAT Solver Thread 3

SAT Solver Thread 1

Object

SAT Solver Thread 3

PaMiraXT: 1 Master, 4 Clients, 16 Threads

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

34 / 35

Interested in MiraXT?

Visit http://ira.informatik.uni-freiburg.de/schubert/

Tobias Schubert (University of Freiburg)

MiraXT A Multi-Threaded SAT Solver

May 31, 2007

35 / 35

You might also like