Introduction Clause exchange in parallel solvers Lazy clause - - PowerPoint PPT Presentation

introduction clause exchange in parallel solvers lazy
SMART_READER_LITE
LIVE PREVIEW

Introduction Clause exchange in parallel solvers Lazy clause - - PowerPoint PPT Presentation

Introduction Clause exchange in parallel solvers Lazy clause exchange Experiments Conclusion . . . . . . . . . . . . . . Lazy clause exchange policy for parallel SAT solvers Gilles Audemard CRIL, Lens, France Laurent


slide-1
SLIDE 1

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Lazy clause exchange policy for parallel SAT solvers

 Gilles Audemard  CRIL, Lens, France  Laurent Simon  Labri, Bordeaux, France

 ANR "Investments for the future" CPU (ANR-10-IDEX-03-02)

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  1/21

slide-2
SLIDE 2

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Today’s Itinerary

. . 

Introduction Clause exchange in parallel solvers Lazy clause exchange Experiments Conclusion

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  2/21

slide-3
SLIDE 3

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Today’s Itinerary

. . 

Introduction

 SAT ingredients

Clause exchange in parallel solvers Lazy clause exchange Experiments Conclusion

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  3/21

slide-4
SLIDE 4

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Ingredients of an efficient SAT solver

. . 

. . Preprocessing (and inprocessing) . Restarting . Branching . Conflict Analysis . Clause Database Cleaning

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  4/21

slide-5
SLIDE 5

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Ingredients of an efficient SAT solver

. . 

. . Preprocessing (and inprocessing) . Restarting . Branching . Conflict Analysis . Clause Database Cleaning

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  4/21

slide-6
SLIDE 6

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Ingredients of an efficient SAT solver

. . 

. .

Preprocessing (and inprocessing)

. Restarting . Branching . Conflict Analysis .

Clause Database Cleaning

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  4/21

slide-7
SLIDE 7

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Ingredients of an efficient SAT solver

. . 

. .

Preprocessing (and inprocessing)

. Restarting . Branching . Conflict Analysis .

Clause Database Additions Deletions

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  4/21

slide-8
SLIDE 8

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Today’s Itinerary

. . 

Introduction Clause exchange in parallel solvers

 From sequential solvers to parallel solvers

Lazy clause exchange Experiments Conclusion

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  5/21

slide-9
SLIDE 9

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Many Cores

Multi-core architecture, cloud ⇒ design of parallel solvers Different strategies

Divide and conquer  Explicitly splits search w.r.t. assignments Portfolio algorithms

Each thread: its own solver and the whole formula

 Rely on orthogonal searches Parallel solver

communication: learnt clauses

 All threads working on the same proof

. . Solver2(Σ) . Solver1(Σ) . Solver3(Σ) . Solver4(Σ)

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  6/21

slide-10
SLIDE 10

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Many Cores, Many more problems

Sharing clauses in parallel has many drawbacks

. . Preprocessing (and inprocessing) . Restarting . Branching . Conflict Analysis . Clause Database Cleaning

Imported clauses can be bad (noise, wrong way, . . . ) Imported clauses can be subsumed / useless Imported clauses can dominate learnt clauses Each thread has to manage many more clauses Many side effects on all core components Currently: Clauses are sent as soon as they are learnt, plus: manysat 1.0: size ≤ 8 manysat 1.1: dynamically adjust the threshold plingeling: size ≤ 30 and LBD ≤ 8 Penelope: LBD ≤ 8 (PSM allows more clauses exchanges)

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  7/21

slide-11
SLIDE 11

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Today’s Itinerary

. . 

Introduction Clause exchange in parallel solvers Lazy clause exchange

 Experiments: Useless Clauses and More Useful Clauses  Lazy Exportation of Clauses  Lazy Importation of Clauses

Experiments Conclusion

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  8/21

slide-12
SLIDE 12

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Many useless clauses even in single engine solvers

. . 

10000 100000 1e+06 1e+07 10000 100000 1e+06 1e+07 #Useless Clauses in final UNSAT Proof #Conflicts Glucose Glucose No reduce DB L.R. Glucose (m=0.42) L.R. Glucose No reduce DB (m=0.55) y=x

x-axis : Number of conflicts y-axis : Useless clauses in final proof (UNSAT formulas)

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  9/21

slide-13
SLIDE 13

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

How many times clauses are seen in conflicts

. . 

1000 10000 100000 1e+06 1e+07 1000 10000 100000 1e+06 1e+07 # Clauses seen at least Z times # Conflicts Seen Z=1 time L.R. Seen 1 time (m=0.91) Seen Z=2 times L.R. Seen 2 times (m=0.34) Seen Z=3 times L.R. Seen 3 times (m=0.22) Seen Z=4 times L.R. Seen 4 times (m=0.17)

x-axis: Number of conflicts y-axis: Number of clauses seen at least Z times

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  10/21

slide-14
SLIDE 14

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Conclusions from the experiments

. . 

A lot of useless clauses even in a single engine!  In parallel, this situation will be even worse! Why sending a clause that is even not locally interesting? We will consider clauses seen 2-times (only 34% of learnt clauses)  Already filter out the majority of clauses How to efficiently detect them? Is there a window of recent clauses to check?  Can we check only recent learnt clauses (and save time)?

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  11/21

slide-15
SLIDE 15

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Learnt and Directly Reused Clauses

. . 

1000 10000 100000 1e+06 1e+07 1000 10000 100000 1e+06 1e+07 # Directly Reused Learnt Clauses # Conflicts Directly Reused Learnt Clause y=x Linear Regression (m=0.41)

x-axis: Number of imported clauses (sum over 8 threads) y-axis: Number of promoted clauses (sum over 8 threads)

91% of clauses seen at least 1 time. Only 41% are immediately seen.

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  12/21

slide-16
SLIDE 16

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Lazy Exportation of Clauses

. . 

Clauses are sent during conflict analysis We only export clauses when seen 2 times in conflict analysis and: Clauses with LBD ≤ median(LBD) and size ≤ average(SIZE)  Limits updated at each clause database cleaning Unary clauses and very glue clauses are immediately sent Lazy because we wait to have a good chance of local interest before considering sending it

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  13/21

slide-17
SLIDE 17

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Lazy Importation of Clauses

. . 

Problem of clauses importations: can destroy the current search effort clauses can be redundant many clauses to manage (performance impact) How to be sure an imported clause is interesting before considering it? Idea: put it in probation Imported clauses are put in a 1-Watched scheme Will be promoted to a 2-Watched scheme only if found empty Other Advantages Less efforts for propagations Can be seen as a dynamic Freezing/Reactivating strategy Clauses are imported with a local (and correct) LBD value

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  14/21

slide-18
SLIDE 18

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Today’s Itinerary

. . 

Introduction Clause exchange in parallel solvers Lazy clause exchange Experiments

 Solver’s Behavior  Solver’s Performances

Conclusion

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  15/21

slide-19
SLIDE 19

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

How many promotions?

. . 

1000 10000 100000 1e+06 1e+07 1000 10000 100000 1e+06 1e+07 # Promoted Clauses (sum over the 8 threads) # Imported Clauses (sum over the 8 threads) Promoted Clauses L.R. Promoted Clauses (m=0.10) y=x

x-axis: Number of imported clauses (sum over 8 threads) y-axis: Number of promoted clauses (sum over 8 threads)

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  16/21

slide-20
SLIDE 20

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Implementation details

. . 

Solvers have many restarts  Import clauses at decision level 0 only Imported clauses (1-Watched) database have its own deletion strategy  Limits the impact of importation on the solver (Gory) Details of Glucose-Syrup in the contest: One solver is created, then cloned Number of solvers adjusted to fit into 40% of allowed memory When approaching the max memory allowed, switch to Panic Mode: Almost Constant Memory consumption mode No tuning of cores strategies. Only the “French’s Flair”.  Idea: as few parameters changes as possible

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  17/21

slide-21
SLIDE 21

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Syrup versus Plingeling on SAT11 benchmarks

. . 

1 10 100 1000 1 10 100 1000 Plingeling (99 SAT + 109 UNSAT) Syrup (98 SAT + 130 UNSAT) SAT UNSAT

Syrup: 228 instances solved - 98 SAT / 130 UNSAT !! Plingeling: 208 instances solved - 99 SAT / 109 UNSAT

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  18/21

slide-22
SLIDE 22

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Syrup versus Plingeling on SAT13 benchmarks

. . 

1 10 100 1000 1 10 100 1000 Plingeling (125 SAT + 110 UNSAT) Syrup (105 SAT + 99 UNSAT) SAT UNSAT

Syrup : 204 instances solved - 105 SAT / 99 UNSAT Plingeling : 235 instances solved - 125 SAT / 110 UNSAT !!

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  19/21

slide-23
SLIDE 23

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Today’s Itinerary

. . 

Introduction Clause exchange in parallel solvers Lazy clause exchange Experiments Conclusion

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  20/21

slide-24
SLIDE 24

. Introduction . . Clause exchange in parallel solvers . . . . . . Lazy clause exchange . . . . Experiments . Conclusion

Conclusion

A simple, efficient, more semantic way to exchange clauses between cores Parallel Glucose seems very efficient on non crypto problems (like Glucose) Special thanks to: Marijn Heule  For helping us debugging the unstable competition version Daniel le Berre  For fruitful discussions at the Banff Workshop Please wait to download a stable-cleaned-improved version of glucose syrup

 SAT (A FLOC Conference) – Vienna  July 2014, 15th  21/21