37
Hongbo Li Zizhong Chen Rajiv Gupta CC’19, Washington DC, USA Feb. 17, 2019 Efficient Concolic Testing of MPI Applications

Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Hongbo LiZizhong Chen Rajiv Gupta

CC’19, Washington DC, USAFeb. 17, 2019

Efficient Concolic Testing of MPI Applications

Page 2: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Concolic Testing

Concrete Execution Symbolic Execution

Page 3: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

It Is PopularProgramming languages:Binary machine code, C, Java, and JavaScript.

Application types:web applications, sensor network applications, Unix utilities,database applications, and embedded software, GPUprograms, image processing software, and so on

Various tools:KLEE, DART, SAGE, PEX, jCute, CREST, Jalangi, etc.

Page 4: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

COMPI [ IPDPS 2018 ]

COMPI is a concolic testing tool for MPI programswith following major features:

Deals with basic MPI semanticsDeals with high testing cost caused by input values,parallelism, and loops

COMPI achieves 69-86% branch coverage within a fewhours

Page 5: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Concolic Testing

(1) Instrumentation (2) Iterative testing

Page 6: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Issues of COMPI

Our Solutions

Evaluation

Page 7: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Issues of COMPI

Our Solutions

Evaluation

Page 8: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Issues of COMPIInput generation does not guarantee cost-effectivetesting

Floating point data types and operations are notsupported

Page 9: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Issue ILarger input values à Longer execution

Solution of COMPI: Input Capping

Solver

∀" ≤ $%&

constraints

valuesProgram execution

Page 10: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

An MPI program performing matrix multiplication.

Example

Page 11: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

!"# = 50à Fail to cover the else branch

NO solution

Small Cap

Page 12: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

! ← C, where 100 < & ≤ 500

&)* = 500à High testing cost

Big Cap

Page 13: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

! ← 1234567

No Capping à Execution failure

No Input Capping

Page 14: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Issue IIFloating-point data types and operations are not supported

Page 15: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Unable to mark !Fixing it to a value àeither f1 or f2 could not be explored

Unable to record " ∗ 1.1Symbolic representation of c is not existing àeither f3 or f4 could not be explored

Page 16: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Issues of COMPI

Our Solutions

Evaluation

Page 17: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Our SolutionsInput tuning à cost effective testing

Floating-point extension à exploration of branches related to the use of floating-point arithmetic

Page 18: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Our SolutionsInput tuning à cost effective testing

Floating-point extension à exploration of branches related to the use of floating-point calculations

Constraint solving using reals instead of floating-point numbers à faster constraint solving

Page 19: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning

Page 20: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning

{! > 100} ∪ {! ≤ )**+,} is solvable

- ← /0/Solution by solver for {! > 100}

- ← /123456

AND {! > 100} ∪ ! ≤ )**+, − / is unsolvable

Binary search of )**+, in (0, 1234567) satisfying:

Tuned solution

Tuning

Page 21: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning for Multi-variableMulti-constraint Case

!" ($%&'!(!%&1)

!" ($%&'!(!%&2) ......

......

$%&,(-.!&(1

$%&,(-.!&(2

True False

True False

Need to solve {$%&,(-.!&(1, $%&,(-.!&(2}

......

Page 22: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning for Multi-variableMulti-constraint Case

!" ($ − & > 100)

!" (& > 0) ......

......

+,-./01!-/1

+,-./01!-/2

True False

True False

Need to solve {$ − & > 100, & > 0}......

Page 23: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning for Multi-variableMulti-constraint Case

{" = 4321, ) = 1234}

Tuning for {+ − - > /00, - > 0}

{" = 4321, ) = 1234, " ≤ 233451, ) ≤ 233451}min{23345} = 102

{" = 4321, ) = 1234, " ≤ 233451, ) ≤ 233452}min{233452} = 1

{" = 102, ) = 1}

Stage I Tuning

Stage II Tuning

Page 24: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning -- SummaryStage I avoids too large values being generated for ALLvariables appearing in dependent constraints

Stage II ensures the smallest value is generated for the SINGLE variable appearing in the target constraint based on Stage I

Page 25: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Our SolutionsInput tuning à cost effective testing

Floating-point extension à exploration of branches related to the use of floating-point arithmetic

Page 26: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Floating-Point ExtensionTwo floating-point data types supported: float, double

The extension adopts the design methodology ofsymbolic reasoning for integersInstrument floating-point operationsRecords only linear constraintsNon-linear constraints are simplified using concrete values, e.g., ! ∗ # isrecorded as $ ∗ ! with C being the concrete value of #

Page 27: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Floating-Point Extension

Two solvers: Real v.s. FloatAccuracy: Real < FloatSolving speed: Real > Float

Real v.s. Float based on 100 iterative tests of asynthetic program that compares expression !with constant 0.

! = # # + % # + % + &Cost (float) 31.4s 75.0s 91.2sCost (real) 8.2s 8.1s 8.2s

3.8-11.1X faster

Page 28: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Limitations of COMPI

Our Solutions

Evaluation

Page 29: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

EvaluationInput tuning is evaluated using HPL, IMB-MPI1, and SUSY-HMC

Floating-point extension is evaluated using SUSY-HMC

One hour testing at each configuration

Initial input values are 1 for all variable in the first test

In the evaluation of input capping, we selects the same cap for all variables

Page 30: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning on H

PL

Page 31: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning on IM

B-M

PI1

Page 32: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning on SU

SY-HM

C

Page 33: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Input Tuning10-minute coverage (input tuning) ≥ 1-hour coverage (other methods)

SUSY-HMC: 1-hour coverage (input tuning) is about 1.2-2.3X higher than 1-hour coverage (other methods)

Page 34: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Floating-point Extension

Page 35: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Floating-point ExtensionReal (1704) > Int (1662) > Float (1582)

Constraint solving time of Real (1.7%) < Constraint solving time of Float (10.9%)

Page 36: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

ConclusionInput tuning10-minute coverage (input tuning) ≥ 1-hour coverage (other methods)SUSY-HMC: 1-hour coverage (input tuning) is about 1.2-2.3Xhigher than 1-hour coverage (other methods)

Floating-point ExtensionFloating-point extension using reals achieve 42-122 more branches than the other two

Page 37: Efficient Concolic Testing of MPI Applicationshli035/publications/slides/CC19_HLi.pdf · 10-minutecoverage (input tuning) ≥1-hourcoverage (other methods) SUSY-HMC: 1-hour coverage

Thank you!