Jiwon Seo - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Jiwon Seo

Description:

Parallel Max-Flow Algorithm ... Continue push and relabel operation on the active ... Java C /C Matlab, Python, Perl, Ruby, etc. Architecture Implication ... – PowerPoint PPT presentation

Number of Views:153
Avg rating:3.0/5.0
Slides: 12
Provided by: cs315bwik
Category:
Tags: and | jiwon | max | ruby | seo

less

Transcript and Presenter's Notes

Title: Jiwon Seo


1
Parallel Max-Flow Algorithm
  • Jiwon Seo
  • May 31st, 2007

2
Max-Flow Algorithm
  • Finding maximum flow from source to sink from a
    directed graph (edges have capacities).
  • Two possible approaches
  • Finding augmenting path from src to sink
    (augmenting path)
  • Push as much flow as possible from src and for
    nodes with excess, try to push excess towards
    sink

Augmenting path
Push from node to node
3
Push Relabel Algorithm
  • Make a height variable for each node analogous
    to water pressure
  • Make a excess variable for each node to hold
    excess flow until pushing it to another node
  • After first push of flow from the source
    (saturating all of its edge capacities) do one of
    two operations on each node(active node)
  • Push push the excess to the node with lower
    height (water pressure)
  • Relabel increment the height of the current node
    so that it can do push operation
  • Constraints for algorithm correctness
  • height(u) lt height(v) 1 for residual edge u -gt
    v

4
Push Relabel Algorithm contd
  • Continue push and relabel operation on the active
    nodes while there is any node with excess except
    source and sink
  • Push operation look at the neighbor nodes and
    pick one node that satisfies the constraint
    height(v) height(u)1
  • Relabel operation if push operation fails for a
    node, increment the height of that node to
    minimum height among neighbors 1

5
Parallel Push Relabel Algorithm
  • Sequential algorithm consists of many of
    operations on active nodes
  • Parallel algorithm distribute active nodes to
    threads
  • Have a shared queue of active nodes
  • Have a local queue of active nodes for each
    thread
  • Each thread should operate on nodes in its local
    queue, sometimes fetching from, queueing to
    shared queue to balance loads among threads.
  • Synchronization
  • Push operation acquire locks for two nodes (to
    avoid deadlock, acquire both locks only when both
    are free)
  • Relabel operation acquire lock for the node
  • Shared queue acquire lock when communicating to
    shared queue

6
Algorithm Analysis
  • Communication
  • Explicit communication with shared queue
  • Implicit communication with neighbor nodes
  • Operations
  • All arithmetic operations in push/relabel are
    very simple there are at most a few additions
    and one assignment for each operation
  • Communication / computation is very high

7
Performance Analysis
  • Assumptions
  • Its not good to leave an active node for long
    not being pushed experience
  • of Active nodes can decrease or increase need
    to rebalance loads
  • Communicating with shared queue too often will be
    an overhead
  • Parameters
  • Pr probability of inteference among active nodes
    (function of thread and local queue size)
  • p1 penalty for not processing a node for long
    time
  • p2 penalty for load inbalance
  • f communication frequency
  • Pc penalty for communication
  • Communication overhead Pc f (f is
    communication frequency)
  • Penalty for less communication Pr(p1p2) 1/f
  • gt Performance Pcf Pr(p1p2)1/f

8
Experiment
  • Implemented parallel push/relabel max flow
    algorithm without any heuristics that speeds up
    sequential algorithm
  • Run the algorithm with random grid graph (size
    10000)
  • on Ultra Sparc 2 SMP 16 cpu
  • and on Niagara CMP 8 cpu, 4 threads/core
  • Lock overhead was around10

9
Experimental Result
10
Application Evaluation
  • Programming Language Mapping
  • PL should provide a way to optimize data layout
    in memory
  • Various (concurrent) data structure will be handy
  • Java gtgt C/C gt Matlab, Python, Perl, Ruby, etc
  • Architecture Implication
  • Transaction instead of lock TCC
  • Multiple thread per core NIAGARA

11
Reference
  • Anderson and Setubal, On the parallel
    implementation of Goldberg's maximum flow
    algorithm
  • Bader and Sachdeva, A Cache-Aware Parallel
    Implementation of the Push-Relabel Network Flow
    Algorithm and Experimental Evaluation of the Gap
    Relabeling Heuristic
  • Quinn and Deo, Parallel Graph Algorithm
  • Goldberg, Recent Developments in Maximum Flow
    Algorithms
Write a Comment
User Comments (0)
About PowerShow.com