Online Routing on the Mesh and Offline Routing on the Benes Network M. Protsenko Ferienakademie im Sarntal 2008 FAU Erlangen-Nürnberg, TU München, Uni Stuttgart September 2008
Overview Introduction 1 Parallel computation models Notation and definitions Permutation routing on the mesh networks 2 Online routing on linear array Online routing on 2D array Permutation networks 3 Congestion in butterfly network Offline routing in bene ˇ s network M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 2 / 81
Overview Introduction 1 Parallel computation models Notation and definitions Permutation routing on the mesh networks 2 Online routing on linear array Online routing on 2D array Permutation networks 3 Congestion in butterfly network Offline routing in bene ˇ s network M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 3 / 81
Parallel machine A parallel machine : a set of processors P = { P 0 , ..., P n − 1 } a communication graph G = ( P , E ) M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 4 / 81
Overview Introduction 1 Parallel computation models Notation and definitions Permutation routing on the mesh networks 2 Online routing on linear array Online routing on 2D array Permutation networks 3 Congestion in butterfly network Offline routing in bene ˇ s network M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 5 / 81
Notation [ n ] := { 0 , ..., n − 1 } bin d ( n ) : binary representation of n using d bits E. g., bin 4 ( 3 ) = 0011 ( a ) n = k for a ∈ [ n ] d : base-n representation of k E. g., ( 201 ) 3 = 19 M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 6 / 81
Hamming distance Let a = ( a d − 1 , ..., a 0 ) , b = ( b d − 1 , ..., b 0 ) ∈ [ n ] d The Hamming distance between a and b : d − 1 � Hamming ( a , b ) := | a i − b i | i = 0 Example: a = 01101 b = 10111 hamming ( a , b ) = 3 M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 7 / 81
Shortest path, diameter G = ( V , E ) - graph and x , y ∈ V then the shortest path dist G ( x , y ) : the minimum number of edges in path between x and y; the diameter of G: diam ( G ) = max { dist G ( x , y ) | x , y ∈ V } Example: dist G ( A , B ) = 2, diam ( G ) = 2 M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 8 / 81
Routing We have: a network M = ( P , E ) , P = [ N ] a function f : [ N ] × [ p ] → [ N ] messages x 0 , 0 , ..., x 0 , p − 1 , x 1 , 0 , ..., x 1 , p − 1 , ..., x N − 1 , 0 , ..., x N − 1 , p − 1 M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 9 / 81
Function routing Function routing M routs x 0 , 0 , ..., x N − 1 , p − 1 according to f if: in the beginning processor i stores the package ( i , f ( i , k ) , x i , k ) in the end processor f(i,k) stores a copy of a message x i , k If p=1: f is a permutation on [ N ] ⇒ permutation routing M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 10 / 81
Routing protocol A synchronous routing protocol for M consists of protocols for all processors i . Each processor i has a buffer to store packages. A routing step for every processor i: i chooses one package from his buffer i selects one of his neighbors j i sends the package to j All processors start the t-th routing step simultaneously M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 11 / 81
Routing time & buffer size The routing time is the number of routing steps The buffer size is the maximum amount of packages that can be stored in a buffer at the same time M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 12 / 81
Definitions Routing with preprocessing (also off-line routing ): routing protocol depends on f At the beginning of routing some computation is performed depending on f to generate protocols for processors i routing without preprocessing ( on-line routing ): the routing protocol is independent from f M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 13 / 81
Mesh networks The n-dimensional mesh with edge length n, M(n,d) : Set of processors P = { a | a ∈ [ n ] d } Communication graph G = ( P , E ) , E = {{ a , b }| a , b ∈ [ n ] d , hamming ( a , b ) = 1 } Edge in Dimension i : the edge connecting two vertices a and b with | a i − b i | = 1 M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 14 / 81
Mesh networks: examples Figure: Some examples of M(n,d) M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 15 / 81
Mesh networks: properties Properties of M ( n , d ) 1 M ( n , d ) has n d nodes and dn d − dn d − 1 edges. 2 dist ( a , b ) = hamming ( a , b ) ; 3 diam ( M ( n , d )) = ( n − 1 ) · d 4 M ( n , d ) | { a | a i = l } ∼ = M ( n , d − 1 ) for d > 0 and fixed i , l 5 M ( n , d ) | { ib | i ∈ [ n ] } ∼ = M ( n , 1 ) for fixed b ∈ [ n ] d − 1 M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 16 / 81
Overview Introduction 1 Parallel computation models Notation and definitions Permutation routing on the mesh networks 2 Online routing on linear array Online routing on 2D array Permutation networks 3 Congestion in butterfly network Offline routing in bene ˇ s network M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 17 / 81
Linear array Online routing on linear array Permutation routing without preprocessing in M ( n , 1 ) can be performed with routing time 2 · ( n − 1 ) and buffer size 3 M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 18 / 81
Linear array The algorithm works in two phases: 1st phase: send packages which destination is to the left 2nd phase: send all another packages M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 19 / 81
Linear array The buffer size is 3 because any processor i stores at most 3 packages: it’s own package package addressed to it some other package that must be transferred The routing time is obvious M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 20 / 81
Example 1st phase: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 21 / 81
Example 1st phase: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 22 / 81
Example 1st phase: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 23 / 81
Example 1st phase: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 24 / 81
Example 1st phase: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 25 / 81
Example 1st phase: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 26 / 81
Example 2nd phase: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 27 / 81
Example 2nd phase: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 28 / 81
Overview Introduction 1 Parallel computation models Notation and definitions Permutation routing on the mesh networks 2 Online routing on linear array Online routing on 2D array Permutation networks 3 Congestion in butterfly network Offline routing in bene ˇ s network M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 29 / 81
2D array Online routing on 2D array Permutation routing without preprocessing in M ( n , 2 ) can be performed with routing time at most 4 · ( n − 1 ) and buffer size at most n M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 30 / 81
2D array Routing in 2 phases: routing in rows routing in columns Packages with farthermost destination have higher priority Routing time for each dimension 2 · ( n − 1 ) A node can become within first phase at most n packages M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 31 / 81
2D array: example Rows: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 32 / 81
2D array: example Rows: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 33 / 81
2D array: example Rows: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 34 / 81
2D array: example Rows: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 35 / 81
2D array: example Columns: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 36 / 81
2D array: example Columns: M. Protsenko (Ferienakademie’08, Sarntal) Routing on Mesh and Benes Networks Sept. 2008 37 / 81
Recommend
More recommend