HordeSat: A Massively Parallel Portfolio SAT Solver SAT 2015, - - PowerPoint PPT Presentation

hordesat a massively parallel portfolio sat solver
SMART_READER_LITE
LIVE PREVIEW

HordeSat: A Massively Parallel Portfolio SAT Solver SAT 2015, - - PowerPoint PPT Presentation

HordeSat: A Massively Parallel Portfolio SAT Solver SAT 2015, Austin, Texas, USA Tom a s Balyo, Peter Sanders, and Carsten Sinz | September 22, 2015 INSTITUTE OF THEORETICAL INFORMATICS, ALGORITHMICS II www.kit.edu KIT University of


slide-1
SLIDE 1

INSTITUTE OF THEORETICAL INFORMATICS, ALGORITHMICS II

HordeSat: A Massively Parallel Portfolio SAT Solver

SAT 2015, Austin, Texas, USA Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz | September 22, 2015

KIT – University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz Association

www.kit.edu

slide-2
SLIDE 2

Definitions

CNF Formula

A Boolean variable has two values: True and False A literal is Boolean variables or its negation A clause is a disjunction (or) of literals A CNF formula is a conjunction (and) of clauses F = (x1 ∨ x2 ∨ x4) ∧ (x3 ∨ x1) ∧ (x1) ∧ (x2 ∨ x4)

Satisfiability

A CNF formula is satisfiable if it has a satisfying assignment. The problem of satisfiability (SAT) is to determine whether a given CNF formula is satisfiable

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 2/20

slide-3
SLIDE 3

Introduction

Goal

Design a massively parallel SAT solver that runs well on clusters with thousands of processors (for industrial benchmarks)

Results

HordeSat – new parallel solver Experiments with industrial benchmarks with up to 2048 processors Significant speedups, especially for hard instances

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 3/20

slide-4
SLIDE 4

Parallel Sat Solving

Explicit Search Space Partitioning

classical approach, search space does not overlap each solver starts with a different fixed partial assignment learned clauses are exchanged used in solvers for grids and clusters

Pure Portfolio

modern approach, simple but strong different solver( configuration)s work on the same problem learned clauses are exchanged

  • ften used in solvers for multi-core PCs

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 4/20

slide-5
SLIDE 5

Parallel Sat Solving

Explicit Search Space Partitioning

classical approach, search space does not overlap each solver starts with a different fixed partial assignment learned clauses are exchanged used in solvers for grids and clusters

Pure Portfolio

modern approach, simple but strong different solver( configuration)s work on the same problem learned clauses are exchanged

  • ften used in solvers for multi-core PCs

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 5/20

slide-6
SLIDE 6

Design Principles

Modular Design

blackbox approach to SAT solvers any solver implementing a simple interface can be used

Decentralization

all nodes are equivalent, no central/master nodes

Overlapping Search and Communication

search procedure (SAT solver) never waits for clause exchange at the expense of losing some shared clauses

Hierarchical Parallelization

running on clusters of multi-cpu nodes shared memory inter-node clause sharing message passing between nodes

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 6/20

slide-7
SLIDE 7

Modular Design

Portfolio Solver Interface void addClause(vector <int > clause ); SatResult solve (); // {SAT , UNSAT , UNKNOWN} void setSolverInterrupt (); void unsetSolverInterrupt (); void setPhase(int var , bool phase ); void diversify(int rank , int size ); void addLearnedClause (vector <int > clause ); void setLearnedClauseCallback (LCCallback* clb); void increaseClauseProduction ();

Lingeling implementation with just glue code MiniSat implementation, small modification for learned clause stuff

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 7/20

slide-8
SLIDE 8

Diversification

Setting Phases – ”void setPhase(int var, bool phase)”

Random – each variable random phase on each node Sparse – each variable random phase on exactly one node Sparse Random – each variable random phase with prob.

1

#solvers

Native Diversification – ”void diversify(int rank, int size)”

Each solver implements in its own way Example: random seed, restart/decision heuristic For lingeling we used plingeling diversification Best is to use Sparse Random together with Native Diversification.

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 8/20

slide-9
SLIDE 9

Clause Sharing

Regular (every 1 second) collective all-to-all clause exchange

Exporting Clauses

Duplicate clauses filtered using Bloom filters Clause stored in a fixed buffer, when full clauses are discarded, when underfilled solvers are asked to produce more clauses Shorter clauses are preferred Concurrent Access – clauses are discarded

Importing Clauses

Filtering duplicate clauses (Bloom filter)

Bloom filters are regularly cleared – the same clauses can be imported after some time Useful since solvers seem to ”forget” important clauses

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 9/20

slide-10
SLIDE 10

Overall Algorithm

The Same Code for Each Process SolveFormula (F, rank , size) { for i = 1 to #threads do { s[i] = new PortfolioSolver (Lingeling ); s[i]. addClauses(F); diversify(s[i], rank , size ); new Thread(s[i]. solve ()); } forever do { sleep (1) // 1 second if ( anySolverFinished ) break; exchangeLearnedClauses (s, rank , size ); } }

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 10/20

slide-11
SLIDE 11

Experiments

Benchmarks

Sat Competition 2014+2011 Application track instances (545 inst.) Phase Transition Random 3-SAT (200 SAT + 200 UNSAT inst.)

Computers

128 Nodes of the IC2 cluster

each with two octa-core Intel Xeon E5-2670 2.6GHz CPU, 64GB RAM connected by InfiniBand 4X QDR Interconnect

In total 256 CPUs and 2048 cores

Setup

Each node runs 4 processes each with 4 threads with Lingeling 1000 seconds time limit (16.7 minutes) for parallel solvers 50000 seconds (13.9 hours) for sequential solvers

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 11/20

slide-12
SLIDE 12

Experiments – Random 3-SAT

100 200 300 400 500 600 700 800 900 1000 20 40 60 80 100 120 140 160 180 200 Time in seconds Problems Satisfiable Instances No Diversification, No Sharing Only Sharing Only Diversification Diversification and Sharing

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 12/20

slide-13
SLIDE 13

Experiments – Random 3-SAT

100 200 300 400 500 600 700 800 900 1000 20 40 60 80 100 120 140 160 Time in seconds Problems Unsatisfiable Instances No Diversification, No Sharing Only Sharing Only Diversification Diversification and Sharing

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 13/20

slide-14
SLIDE 14

Experiments – (P)lingeling Comparison

100 200 300 400 500 600 700 800 900 1000 50 100 150 200 250 300 350 400 Time in seconds Problems Lingeling (1 thread) Plingeling (8 threads) HordeSat 1x8x1 (8 threads) Plingeling (16 threads) HordeSat 1x16x1 (16 threads)

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 14/20

slide-15
SLIDE 15

Experiments – (P)lingeling Comparison

100 200 300 400 500 600 700 800 900 1000 50 100 150 200 250 300 350 400 Time in seconds Problems Lingeling (1 thread) Plingeling (8 threads) HordeSat 1x8x1 (8 threads) Plingeling (16 threads) HordeSat 1x16x1 (16 threads)

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 15/20

slide-16
SLIDE 16

Experiments – Scalability on SAT 2011

200 400 600 800 1000 1200 50 100 150 200 250 Time in seconds Problems Lingeling 1x4x4 2x4x4 4x4x4 8x4x4 16x4x4 32x4x4 64x4x4 128x4x4

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 16/20

slide-17
SLIDE 17

Experiments – SAT 2011+2014

200 400 600 800 1000 1200 50 100 150 200 250 300 350 400 450 500 Time in seconds Problems Lingeling 1x4x4 2x4x4 4x4x4 8x4x4 16x4x4 32x4x4 64x4x4 128x4x4

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 17/20

slide-18
SLIDE 18

Experiments – Speedups

Big Instance = solved after 10 · (#threads) seconds by Lingeling

Core Parallel Both Speedup All Speedup Big Solvers Solved Solved Avg. Tot. Med. Avg. Tot. Med. 1x4x4 385 363 303 25.01 3.08 524 26.83 4.92 2x4x4 421 392 310 30.38 4.35 609 33.71 9.55 4x4x4 447 405 323 41.30 5.78 766 49.68 16.92 8x4x4 466 420 317 50.48 7.81 801 60.38 32.55 16x4x4 480 425 330 65.27 9.42 1006 85.23 63.75 32x4x4 481 427 399 83.68 11.45 1763 167.13 162.22 64x4x4 476 421 377 104.01 13.78 2138 295.76 540.89 128x4x4 476 421 407 109.34 13.05 2607 352.16 867.00

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 18/20

slide-19
SLIDE 19

Experiments – Speedups on Big Inst.

Big Instance = solved after 10 · (#threads) seconds by Lingeling

0.1 1 10 100 1000 10000 100000 50 100 150 200 250 Speedups Problems 2x4x4 4x4x4 8x4x4 16x4x4 32x4x4 64x4x4 128x4x4

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 19/20

slide-20
SLIDE 20

Conclusion

HordeSat is scalable in highly parallel environments. Superlinear and nearly linear scaling in average, total, and median speedups, particularly on hard instances. Runtimes of difficult SAT instances are reduced from hours to minutes on commodity clusters

This may open up new interactive applications

On a single machine we match the state-of-the-art performance of Plingeling

Tom´ aˇ s Balyo, Peter Sanders, and Carsten Sinz – HordeSat September 22, 2015 20/20