scalable parallel numerical constraint solver using global...

34
June 14 @X10’15 Daisuke Ishii Tokyo Institute of Technology Kazuki Yoshizoe Tokyo University Toyotaro Suzumura IBM Research, UCD, JST 1 Scalable Parallel Numerical Constraint Solver using Global Load Balancing

Upload: others

Post on 17-Oct-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

June 14 @X10’15

Daisuke Ishii Tokyo Institute of Technology

Kazuki Yoshizoe Tokyo University

Toyotaro Suzumura IBM Research, UCD, JST

1

Scalable Parallel Numerical Constraint Solver using Global Load Balancing

Page 2: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Example of Numerical Constraint Satisfaction Problem

2

Constraint

Solution

Variables Domain

(x1,x2,x3,x4,x5) ∈ [-100,100]5

f (x , q) = (x − A)2 + (q − B)2 − L2 = 0

Variables: x1, x2, x3, q1, q2, q3Domain: [−50, 50]2 × [0]× [π,π]3

Constraint:(x1XA − L1 cos q1)2 + (x2YA − L1 sin q1)2 − 100 = 0,

(x1 + P1 cos x3 − XB − L2 cos q2)2+(x2 + P1 sin x3YB − L2 sin q2)2 − 100 = 0,

(x1 + P2 cos(x3 + φ)− L3 cos q3)2+(x2 + P2 sin(x3 + φ)− YC − L3 sin q3)2 − 100 = 0

∀x ∈ [x ], ∃ a unique q∈ [q],f (x , q) = 0

∀x ∈ [x ], ∀q∈ [q],detFx(x , q) ̸= 0 ∧ detFq(x , q) ̸= 0

∀([x ], [q]), ([x ′], [q′]) connected, ∃(x , q) ∈ ([x ], [q]) ∩ ([x ′], [q′]), f (x , q) = 0

⎜⎜⎝

(x1 − 8 cos q1)2

+(x2 − 8 sin q1)2 − 52

(x1 − 5 cos q2 − 9)2

+(x2 − 5 sin q1)2 − 82

⎟⎟⎠ = 0

q̂ + Γ([Jq], ([q]− q̂), [f ]([x ], q̂)) ⊆ int [q]

⎜⎜⎜⎜⎜⎝

x21 + x22 − q21

(x1 + 17 cos x3 − 15.9)2+(x2 + 17 sin x3)2 − q22

(x1 + 20.8 cos(x3 + 0.8822))2+(x2 + 20.8 sin(x3 + 0.8822)− 10)2 − q23

⎟⎟⎟⎟⎟⎠= 0

⎜⎜⎜⎜⎜⎜⎝

(x1 − 10− 10 cos q1)2 + (x2 − 10− 10 sin q1)2 − 100

(x1 + 10 cos x3 − 10− 10 cos q2)2+(x2 + 10 sin x3 − 10− 10 sin q2)2 − 100

(x1 + 10√2 cos(x3 + π/4)− 10 cos q3)2+

(x2 + 10√2 sin(x3 + π/4)− 10− 10 sin q3)2 − 100

⎟⎟⎟⎟⎟⎟⎠= 0

(x21 + x22 − q21

(x1 − 9)2 + x22 − q22

)= 0

⎜⎜⎜⎜⎜⎜⎜⎝

x1

x4

(3− 2x2)x2 − x1 − 2x3 + 1

(3− 2x3)x3 − x2 − 2x4 + 1

(3− 2x4)x4 − x3 − 2x5 + 1

⎟⎟⎟⎟⎟⎟⎟⎠

= 0

1

Page 3: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Example of Numerical Constraint Satisfaction Problem

3

(x, y) ∈ [-2,3]×[-3,1]

-1 0 1 2

-2

-1

0

x

y

[x]

Solution set

Constraint

Variables

Projected solution set onto x

Domain

x1 = 0 x4 = 0

(3− 2x2)x2 − x1 − 2x3 + 1 = 0

(3− 2x3)x3 − x2 − 2x4 + 1 = 0

(3− 2x4)x4 − x3 − 2x5 + 1 = 0

∃y (x + cos 3y)2 + (y + 1)2 − 1 = 0

∃y1, y2!x1 − y1 − 2 cos y2x2 − y1 − 2 sin y2

"= 0

x1 − y1 − 2 cos y2 = 0

x2 − y1 − 2 sin y2 = 0

2

Page 4: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Projected solution set

Example of Numerical Constraint Satisfaction Problem

4

(0,0)

(4,4)(x1,x2)

(y1,y1)

y2

(x1,x2,y1,y2) ∈ [-10,10]2× [0,4]×[-π,π]

Constraint Variables

Possible set of inputs

Reachable region

Domain

x1 = 0 x4 = 0

(3− 2x2)x2 − x1 − 2x3 + 1 = 0

(3− 2x3)x3 − x2 − 2x4 + 1 = 0

(3− 2x4)x4 − x3 − 2x5 + 1 = 0

∃y (x + cos 3y)2 + (y + 1)2 − 1 = 0

∃y1, y2

!x1 − y1 − 2 cos y2

x2 − y1 − 2 sin y2

"=0

x1 − y1 − 2 cos y2 = 0

x2 − y1 − 2 sin y2 = 0

2

Page 5: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Application: Workspace Analysis of Parallel Robots

5http://en.wikipedia.org/wiki/Stewart_platform

DexTAR [L. Campos+ 2010]

NCSP

P1

P2

x1

x2

[Caro+ 14]

Page 6: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Numerical Constraint Satisfaction Problems (NCSPs)

• Framework for describing/analyzing problems in the domain of reals - Application: systems control, robotics, economics,

biology, etc.

•NCSP solvers based on interval analysis have been developed -Computation of boxes (i.e. interval vectors) that

enclose the solution set using the Branch-and-Prune algorithm

- E.g. Realpaver [Granvilliers+ 06]

6

Page 7: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

• Exponential computational complexity limits the number of tractable instances

•We propose a scalable parallel NCSP solver using search-space splitting and global load balancing

Parallelization of NCSP Solving Process

7

Page 8: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Parallelization of (Numerical) CSP Solvers•Difficulty of parallelizing CSP solvers lies in the balanced search-space splitting - Search tree easily becomes unbalanced, and it is

difficult to predict the appropriate splitting - Dynamic load balancing (work stealing) scheme - Parallel CSP solvers (w. central master process) are limited

to scaling up to a few hundred cores [Jaffar+ 04], [Bourdeaux+ 06], [Xie 10], [Bergman+ 14], etc.

•Global load balancing [Saraswat+ 11], [Zhang+ 14] - Scalable scheme with decentralized work stealing and

termination detection - For generic irregular parallel computation

• Scalable parallelization of the branch-and-prune algorithm that handles the continuous domain (Cf. branch-and-bound algorithm) 8

Page 9: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Talk Outline

1.Introduction

2.Branch-and-Prune algorithm and parallel method

3.Experimental results

9

Page 10: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Branch-and-Prune Algorithm

10

Initial domainAlternates

search (branch) and

contraction (prune)

Prune

Branch

Set of ε-boxes Prune

solution set of f(x,y)=0

Page 11: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Outer and inner approximation of the projection

Detection of Inner Boxes [Ishii+ 12]

• Prune procedure can verify that a box is inside the x-projection of the solution set • Inner boxes need not to be searched

11

Boundary ε-boxes

Inner boxes

x

y

Page 12: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Parallel Branch-and-Prune

•We apply a Global Load Balancing scheme that runs a solver worker on each of the available CPU cores

• Each worker homogeneously interleaves the following procedures 1. Branch and prune search 2. Distribution/load balancing of search space 3. Termination detection

12

Page 13: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

…∅solution box set

(ε-boxes and inner boxes)empty box

Branch-and-Prune Algorithm• A step computation

13

…queue of undecided boxes

BranchPrune

Page 14: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Parallel Branch-and-Prune• Search-space splitting

14

…queue of undecided boxes

Prune Branch Prune Branch Prune Branch

…Worker 0 Worker 1 Worker (#p-1)

Page 15: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Global Load Balancing (GLB) Scheme• [Saraswat+ PPoPP’11], [Zhang+ PPAA’14]

•Generic scheme for parallelizing irregular tasks -Workload for each subtask is not predictable

•Based on a Lifeline graph work-stealing algorithm - Provides a workload distribution/termination mechanism

among a number of homogeneous workers

• Implemented in X10 with configurable parameters -User should provide glb.TaskQueue and glb.TaskBag

implementations15

Page 16: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Parallel Computation using GLB

• Each worker becomes either active or idle

16

Active Run task process;

Once every i seconds, distribute the workload to idling workers

Idle Step 1. Attempt w random stealing Step 2. Attempt stealing via the lifeline graph

No more workloads

Receive a workload

Page 17: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Parallel Computation using GLB

17

Worker 1 Worker 3Worker 2Worker 0∅

Request for the workloads

∅ ∅Run task process

Split & distribute boxes

∅ ∅∅ ∅

Termination detection via the lifeline graph

Page 18: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

TaskQueue Implementation

18

NCSPTaskQueue implements glb.TaskQueue

// Queue of boxes. val queue : List[IntervalVec]; !def process(i:Double) : Boolean { // Run Branch&Prune during i seconds. } def split() : TaskBag { // Split the queue into halves and // return a portion as a TaskBag. } def merge(bag:TaskBag) { // Append the bag into the queue. } def getResult() : Long { // Return # boxes in the queue. }

Page 19: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

TaskBag Implementation

19

NCSPTaskBag implements glb.TaskBag

// Array of (undecided) boxes. val data : Rail[IntervalVec]; !def size() : Long { // # of boxes return data.size(); }

Page 20: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Lifeline•Hyper-cube-shaped graph between the workers/places • Parameters (assume lz ≧ P)

-l: diameter -z: # branches

20

P1P4

P0 P2

P5 P7

P3P6

P0

P1

P2P3

P4

P5

P6P7

l=2, z=3l=8, z=1

Page 21: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Talk Outline

1.Introduction

2.Branch-and-Prune algorithm and parallel method

3.Experimental results

21

Page 22: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Implementation

• Implemented the proposed method with C++ and X10 (ver. 2.4.3.2, MPI backend) -Deploys a worker on a X10 place (i.e. a CPU core)

• Used libraries - Realpaver: a sequential C++ implementation of branch and prune !

• Code available at https://github.com/dsksh/icpx10

22

Page 23: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

TSUBAME Supercomputer @Tokyo Tech.

• CPU: Intel Westmere EP (Xeon X5670 2.93GHz, 12 CPU cores per node) •RAM: 54GB •# of nodes: 1466 (we used 50 nodes) •Network: Dual-rail QDR Infiniband (80Gbps) 23

Page 24: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Experiments• Solved 10 instances of 4 problems

- Instances are generated by varying ✴# of variables ✴# of constraints ✴box precision (ε)

• Solving parameters -i: time interval between load balancing -l: diameter of the lifeline; z: ceil(logl P) -w: # of branches in the lifeline

• Solved with 7 parameter configurations

24

(1) i=0.001s, l=2, w=0 (2) i=0.001s, l=2, w=1

(4) i=0.001s, l=P, w=0 (3) i=0.001s, l=2, w=z

(5) i=0.001s, l=P, w=z (6) i=0.1s, l=2, w=0 (7) i=0.1s, l=2, w=z

Page 25: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Speedup (Economics Model)

25

Configuration: (1) (2) (3) (4) (5) (6) (7)

!! ! ! !

"" " " "

#

## # #

$$ $ $ $

%

%% % %

&

& & & &'

'

'' ' 141

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 516

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(a) eco8 (left), eco10 (right)

!

!! ! !

"" " " "

#

#

# ##

$$ $ $ $

%

%

%

%%

&

&

& & &

'

'

'

'

' 252

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

""

" "

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 315

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

'494

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(b) sp2-2, ✏ = 0.004 (left); sp2-4, ✏ = 0.004 (middle); sp2-4, ✏ = 0.001 (right)

!

!

!!

!

"

"

" " "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&&

&

'

'

'

'

' 357

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"" "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 427

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(c) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 5. Speedup of the solving process

(a) eco8 (left), eco10 (right)

(b) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 6. Breakdown of CPU time with timings for pruning, load sending, and idling

Configuration: (1) (2) (3) (4) (5) (6) (7)

!! ! ! !

"" " " "

#

## # #

$$ $ $ $

%

%% % %

&

& & & &'

'

'' ' 141

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 516

0 100 200 300 400 500 600

100

200

300

400

500

600

PlacesSpeedup

(a) eco8 (left), eco10 (right)

!

!! ! !

"" " " "

#

#

# ##

$$ $ $ $

%

%

%

%%

&

&

& & &

'

'

'

'

' 252

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

""

" "

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 315

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

'494

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(b) sp2-2, ✏ = 0.004 (left); sp2-4, ✏ = 0.004 (middle); sp2-4, ✏ = 0.001 (right)

!

!

!!

!

"

"

" " "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&&

&

'

'

'

'

' 357

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"" "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 427

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(c) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 5. Speedup of the solving process

(a) eco8 (left), eco10 (right)

(b) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 6. Breakdown of CPU time with timings for pruning, load sending, and idling

Speedup

Places

(7) i=0.1s, l=2, w=z (6) i=0.1s, l=2, w=0 (5) i=0.001s, l=P, w=z

(1) i=0.001s, l=2, w=0 (2) i=0.001s, l=2, w=1

(4) i=0.001s, l=P, w=0 (3) i=0.001s, l=2, w=z

eco-8-10-8 eco-10-10-8

communicated 47K boxes

communicated 2.6M boxes

Page 26: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Speedup (Intersection of Sphere and Planes)

26

Speedup

Placessp-2-4-0.004

Configuration: (1) (2) (3) (4) (5) (6) (7)

!! ! ! !

"" " " "

#

## # #

$$ $ $ $

%

%% % %

&

& & & &'

'

'' ' 141

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 516

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(a) eco8 (left), eco10 (right)

!

!! ! !

"" " " "

#

#

# ##

$$ $ $ $

%

%

%

%%

&

&

& & &

'

'

'

'

' 252

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

""

" "

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 315

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

'494

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(b) sp2-2, ✏ = 0.004 (left); sp2-4, ✏ = 0.004 (middle); sp2-4, ✏ = 0.001 (right)

!

!

!!

!

"

"

" " "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&&

&

'

'

'

'

' 357

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"" "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 427

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(c) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 5. Speedup of the solving process

(a) eco8 (left), eco10 (right)

(b) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 6. Breakdown of CPU time with timings for pruning, load sending, and idling

Configuration: (1) (2) (3) (4) (5) (6) (7)

!! ! ! !

"" " " "

#

## # #

$$ $ $ $

%

%% % %

&

& & & &'

'

'' ' 141

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 516

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(a) eco8 (left), eco10 (right)

!

!! ! !

"" " " "

#

#

# ##

$$ $ $ $

%

%

%

%%

&

&

& & &

'

'

'

'

' 252

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

""

" "

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 315

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

'494

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(b) sp2-2, ✏ = 0.004 (left); sp2-4, ✏ = 0.004 (middle); sp2-4, ✏ = 0.001 (right)

!

!

!!

!

"

"

" " "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&&

&

'

'

'

'

' 357

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"" "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 427

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(c) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 5. Speedup of the solving process

(a) eco8 (left), eco10 (right)

(b) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 6. Breakdown of CPU time with timings for pruning, load sending, and idling

Configuration: (1) (2) (3) (4) (5) (6) (7)

!! ! ! !

"" " " "

#

## # #

$$ $ $ $

%

%% % %

&

& & & &'

'

'' ' 141

0 100 200 300 400 500 600

100

200

300

400

500

600

PlacesSpeedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 516

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(a) eco8 (left), eco10 (right)

!

!! ! !

"" " " "

#

#

# ##

$$ $ $ $

%

%

%

%%

&

&

& & &

'

'

'

'

' 252

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

""

" "

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 315

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

'494

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(b) sp2-2, ✏ = 0.004 (left); sp2-4, ✏ = 0.004 (middle); sp2-4, ✏ = 0.001 (right)

!

!

!!

!

"

"

" " "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&&

&

'

'

'

'

' 357

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"" "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 427

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(c) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 5. Speedup of the solving process

(a) eco8 (left), eco10 (right)

(b) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 6. Breakdown of CPU time with timings for pruning, load sending, and idling

sp-2-2-0.004

(7) i=0.1s, l=2, w=z (6) i=0.1s, l=2, w=0 (5) i=0.001s, l=P, w=z

(1) i=0.001s, l=2, w=0 (2) i=0.001s, l=2, w=1

(4) i=0.001s, l=P, w=0 (3) i=0.001s, l=2, w=z

sp-2-4-0.001

communicated 12.9M boxes

communicated 1.8M boxes

communicated 295K boxes

Page 27: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Speedup (3-RPR Robot)

27

Speedup

Places

Configuration: (1) (2) (3) (4) (5) (6) (7)

!! ! ! !

"" " " "

#

## # #

$$ $ $ $

%

%% % %

&

& & & &'

'

'' ' 141

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 516

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(a) eco8 (left), eco10 (right)

!

!! ! !

"" " " "

#

#

# ##

$$ $ $ $

%

%

%

%%

&

&

& & &

'

'

'

'

' 252

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

""

" "

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 315

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

'494

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(b) sp2-2, ✏ = 0.004 (left); sp2-4, ✏ = 0.004 (middle); sp2-4, ✏ = 0.001 (right)

!

!

!!

!

"

"

" " "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&&

&

'

'

'

'

' 357

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"" "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 427

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(c) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 5. Speedup of the solving process

(a) eco8 (left), eco10 (right)

(b) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 6. Breakdown of CPU time with timings for pruning, load sending, and idling

Configuration: (1) (2) (3) (4) (5) (6) (7)

!! ! ! !

"" " " "

#

## # #

$$ $ $ $

%

%% % %

&

& & & &'

'

'' ' 141

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 516

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(a) eco8 (left), eco10 (right)

!

!! ! !

"" " " "

#

#

# ##

$$ $ $ $

%

%

%

%%

&

&

& & &

'

'

'

'

' 252

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

""

" "

"

#

#

#

#

#

$$ $ $ $

%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 315

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"

"

"

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

'494

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(b) sp2-2, ✏ = 0.004 (left); sp2-4, ✏ = 0.004 (middle); sp2-4, ✏ = 0.001 (right)

!

!

!!

!

"

"

" " "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&&

&

'

'

'

'

' 357

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

!

!

!

!

!

"

"

"" "

#

#

#

#

#

$ $ $ $ $%

%

%

%

%

&

&

&

&

&

'

'

'

'

' 427

0 100 200 300 400 500 600

100

200

300

400

500

600

Places

Speedup

(c) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 5. Speedup of the solving process

(a) eco8 (left), eco10 (right)

(b) 3rpr, ✏ = 0.2 (left), ✏ = 0.1 (right)

Figure 6. Breakdown of CPU time with timings for pruning, load sending, and idling

3rpr-3-3-0.13rpr-3-3-0.2

(7) i=0.1s, l=2, w=z (6) i=0.1s, l=2, w=0 (5) i=0.001s, l=P, w=z

(1) i=0.001s, l=2, w=0 (2) i=0.001s, l=2, w=1

(4) i=0.001s, l=P, w=0 (3) i=0.001s, l=2, w=z

communicated 1.6M boxes

communicated 5.6M boxes

Page 28: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Discussion

•Our parallel solver scaled up to 600 places/cores -Achieved up to 516-fold speedup (efficiency of 0.84)

28

Page 29: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Discussion

•Configuration (1) accomplished the best speedups for most of the problems -Workload distribution and termination via lifeline were

quick -…despite its large communication overhead

•For large instances, configurations (2), (3), and (5) outperformed configuration (1) -W. frequent random stealing - Active ratio in the CPU time was high -Configuration (2) often performed better because of its

quick termination process

29

Page 30: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Discussion

• Computation w. the smallest time interval i performed well - Workload distribution once after almost every Prune

process

• Configuration (4) performed poorly - Lifeline was formed as a 1D hyper cube (ring) - Enabling the random stealing improved the computation

(Configuration (5))

30

Page 31: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Discussion

• Configuration (1) often scaled better than other configurations when using 600 cores - Random stealing w. many cores might suffered from

large communication overhead

• Certain speedups were achieved even w. quite short running time

31

Page 32: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

CPU Timing Breakdown (Economics Model)

32

581

595.5

605916

1806127

3006237

600581

6110

6062

53

180

68

111

300

69

227

600configuration !1" configuration !2"0

50100150200250300

Time

5070

1

6040

54

60

6035

247

180

6070

472

300

6090

860

600

5070

1

6039

20

60

6017

90

180

6094

186

300

6210

463

600configuration !1" configuration !2"0

1000200030004000500060007000

Time

eco-8-10-8

eco-10-10-8

PruneLoad sendingIdle

Page 33: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

CPU Timing BreakdownSpeedup (Intersection of Sphere and Planes)

122

1

1224.9

60

12016

180

12526

300

126

46

600

122

1

1238.8

60

135

57

180

126

74

300

145

240

600configuration H1L configuration H2L

0

100

200

300

400

Time

780

1

977

15.8

60

970

40

180

980

100

300

992

155

600

780

1

975

18

60

998

76

180

971

101

300

1060

330

600configuration H1L configuration H2L

0200400600800100012001400

Time

12800

1

14600

157

60

14500

370

180

14600

700

300

14700

1250

600

12800

1

14600

180

60

14600

131

180

14400

165

300

14700

386

600configuration H1L configuration H2L

0

5000

10000

15000

Time

sp-2-2‒0.004

sp-2-4‒0.004

sp-2-4‒0.001

Load sendingPrune

Idle

Page 34: Scalable Parallel Numerical Constraint Solver using Global ...x10.sourceforge.net/documentation/papers/X10Workshop2015/slide… · Example of Numerical Constraint Satisfaction Problem

Conclusion

• Parallel solving of NCSPs is a good application of GLB

• Experimental results with 600 X10 places: Achieved almost linear speedup up to 516 fold

• Code available at https://github.com/dsksh/icpx10

• Future work: - Estimation of parameter configurations - Parallelize Prune -Application: e.g. large robotics problems

34