Stephan Kottler and Michael Kaufmann -...
Transcript of Stephan Kottler and Michael Kaufmann -...
-
SARTAGNANA PARALLEL PORTFOLIO SAT SOLVER
WITH LOCKLESS PHYSICAL CLAUSE SHARING
Stephan Kottler and Michael Kaufmann
University of Tuebingen
1 — KOTTLER, KAUFMANN (SARTAGNAN)
-
OUTLINE
1 MOTIVATION
2 PARALLEL SOLVINGPhysical clause sharingCommunication of threads
3 PORTFOLIO SOLVING
4 SUMMARY
2 — KOTTLER, KAUFMANN (SARTAGNAN)
-
I MOTIVATION
STATE-OF-THE-ART SOLVINGCDCL
partial assignmentdecisions based on variable activityconflict analysisrestarts
DMRPcomplete assignment (ref. point)
decisions based on unsat clauses
slower than CDCL but less decisions
3 — KOTTLER, KAUFMANN (SARTAGNAN)
-
I MOTIVATION
STATE-OF-THE-ART SOLVINGCDCL
partial assignmentdecisions based on variable activityconflict analysisrestarts
DMRPcomplete assignment (ref. point)
decisions based on unsat clauses
slower than CDCL but less decisions
3 — KOTTLER, KAUFMANN (SARTAGNAN)
-
I MOTIVATION
KINDS OF PARALLELISATIONDivision of search space (guiding path)Portfolio solving
CLAUSE SHARINGMost solvers: copy learnt clauses of other threads
MAIN AIMReal / physical sharing of dataThreads work together⇒ Any thread may benefit from strengthened clauseNo use of OS locks
4 — KOTTLER, KAUFMANN (SARTAGNAN)
-
I MOTIVATION
KINDS OF PARALLELISATIONDivision of search space (guiding path)Portfolio solving
CLAUSE SHARINGMost solvers: copy learnt clauses of other threads
MAIN AIMReal / physical sharing of dataThreads work together⇒ Any thread may benefit from strengthened clauseNo use of OS locks
4 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II PARALLEL SOLVING
BASIC CONCEPT TO SHARE DATA
Shared data / objects contain user-maskuser-mask initialised by creating threadAny thread can release object (clear bit)Last thread destructs object
Compare and Swap operation
void release(SharedObj obj, tId){do{
SharedObj{ old = obj.umask;umask; new = clear bit ’tId’ in old;... }while(!exchange(obj.umask,old,new));} if(new == 0) destruct(obj);
}
5 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II PARALLEL SOLVING
BASIC CONCEPT TO SHARE DATA
Shared data / objects contain user-maskuser-mask initialised by creating threadAny thread can release object (clear bit)Last thread destructs object
Compare and Swap operationvoid release(SharedObj obj, tId){do{
SharedObj{ old = obj.umask;umask; new = clear bit ’tId’ in old;... }while(!exchange(obj.umask,old,new));} if(new == 0) destruct(obj);
}
5 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.A PHYSICAL CLAUSE SHARINGII PARALLEL SOLVING
PHYSICAL SHARING OF CLAUSESHave one instance of a clauseIndirection to access clause (thread private data)
6 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.A PHYSICAL CLAUSE SHARINGII PARALLEL SOLVING
SHARED CLAUSE’ ARCHITECTURE
7 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.A PHYSICAL CLAUSE SHARINGII PARALLEL SOLVING
REFERENCING CLAUSES IN CDCLUnit propagationConflict analysisGarbage collection
OBSERVATIONWhenever a clause is referenced at least onewatched literal is known
LEMMATwo watched literals li , lj can be stored by one value:Cw = li xor lj .(li xor Cw → lj )
8 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.A PHYSICAL CLAUSE SHARINGII PARALLEL SOLVING
REFERENCING CLAUSES IN CDCLUnit propagationConflict analysisGarbage collection
OBSERVATIONWhenever a clause is referenced at least onewatched literal is known
LEMMATwo watched literals li , lj can be stored by one value:Cw = li xor lj .(li xor Cw → lj )
8 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.A PHYSICAL CLAUSE SHARINGII PARALLEL SOLVING
REFERENCING CLAUSES IN CDCLUnit propagationConflict analysisGarbage collection
OBSERVATIONWhenever a clause is referenced at least onewatched literal is known
LEMMATwo watched literals li , lj can be stored by one value:Cw = li xor lj .(li xor Cw → lj )
8 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.A PHYSICAL CLAUSE SHARINGII PARALLEL SOLVING
SHARED CLAUSE’ ARCHITECTURE II
9 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.A PHYSICAL CLAUSE SHARINGII PARALLEL SOLVING
DIGRESS TO SEQUENTIAL SOLVERSOrder of literals may be modifiedStore clause C with |C|−1 integers
10 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.A PHYSICAL CLAUSE SHARINGII PARALLEL SOLVING
OVERHEAD OF CLAUSE ORGANISATIONComparison of different implementations with single thread
11 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
COMMUNICATION OF THREADS
Message queues used to send . . .a new clause (may be new version)notification on variable eliminationvariable replacementheuristic information
! Messages not only for heuristics! Keep order of messages! No OS locks
12 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
COMMUNICATION OF THREADS
Message queues used to send . . .a new clause (may be new version)notification on variable eliminationvariable replacementheuristic information
! Messages not only for heuristics! Keep order of messages! No OS locks
12 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
LOCKLESS QUEUESone reading / one writing threadwriteHead points to next write positionreadHead points to next read positionqueue empty if writeHead = readHead
13 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
LOCKLESS QUEUESone reading / one writing threadwriteHead points to next write positionreadHead points to next read positionqueue empty if writeHead = readHead
13 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
LOCKLESS QUEUESone reading / one writing threadwriteHead points to next write positionreadHead points to next read positionqueue empty if writeHead = readHead
13 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
LOCKLESS QUEUESone reading / one writing threadwriteHead points to next write positionreadHead points to next read positionqueue empty if writeHead = readHead
13 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
LOCKLESS QUEUESone reading / one writing threadwriteHead points to next write positionreadHead points to next read positionqueue empty if writeHead = readHead
13 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
DYNAMIC SIZEWrite operation may failWrite operation may overwrite unseen data
IDEAQueue links to available update
Queue hasseveral readingthreads!
14 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
DYNAMIC SIZEWrite operation may failWrite operation may overwrite unseen data
IDEAQueue links to available update
Queue hasseveral readingthreads!
14 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
DYNAMIC SIZEWrite operation may failWrite operation may overwrite unseen data
IDEAQueue links to available update
Queue hasseveral readingthreads!
14 — KOTTLER, KAUFMANN (SARTAGNAN)
-
II.B COMMUNICATION OF THREADSII PARALLEL SOLVING
DYNAMIC SIZEWrite operation may failWrite operation may overwrite unseen data
IDEAQueue links to available update
Queue hasseveral readingthreads!
14 — KOTTLER, KAUFMANN (SARTAGNAN)
-
III PORTFOLIO SOLVING
DIFFERENT STRATEGIES
6 of 8 threads apply CDCL (different settings)Activity of Variables / LiteralsGlucose / Static / Geometric / Luby restart schemes
Dedicated simplification threadsatElite like simplificationAsymmetric branching / vivificationSCC computation and removal of redundant binaries
Connect work - DMRPAt each restart: init reference point to set eachvariable to predominant value among all threadsLearn ’interesting’ clauses
15 — KOTTLER, KAUFMANN (SARTAGNAN)
-
III PORTFOLIO SOLVING
TAKE ADVANTAGE OF SHARING
Simplification of clause DB is sharedimmediatelyOn-the-fly clause subsumption done by anythread⇒ Any thread may benefitLazy hyper binary resolution
16 — KOTTLER, KAUFMANN (SARTAGNAN)
-
III PORTFOLIO SOLVING
DMRP & LITERALS ACTIVITY
17 — KOTTLER, KAUFMANN (SARTAGNAN)
-
IV SUMMARY
SUMMARY
Physical clause sharingXOR idea to store watched literalsparallel and sequential solvers
Communication without OS locks
CHALLENGES! Has to run in parallel
Difficult to measure speedupComputation time
? Logging without influencing course of events
18 — KOTTLER, KAUFMANN (SARTAGNAN)
-
IV SUMMARY
CLAUSE COPYING STILL FASTER
Thank you for your attention!
19 — KOTTLER, KAUFMANN (SARTAGNAN)
MotivationParallel SolvingPhysical clause sharingCommunication of threads
Portfolio SolvingSummary