:C MPI - PowerPoint PPT Presentation

1 / 4
About This Presentation
Title:

:C MPI

Description:

For each process with odd rank P, send its number to the ... data into rows and columns in a gird allowing us to sort those rows and columns concurrently. ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 5
Provided by: lul5
Category:
Tags: mpi | gird

less

Transcript and Presenter's Notes

Title: :C MPI


1
???????C ? MPI???????
  • ???
  • 2008/1/27-31

2
Parallel Odd-Even Transposition Sort
  • Initially,  n numbers are distributed to n
    processes, respectively.
  • For each process with odd rank P, send its number
    to the process with rank P-1.
  • For each process with rank P-1, compare its
    number with the number sent by the process with
    rank P and send the larger one back to the
    process with rank P.
  • For each process with even rank Q, send its
    number to the process with rank Q-1.
  • For each process with rank Q-1, compare its
    number with the number sent by the process with
    rank Q and send the larger one back to the
    process with rank Q.
  • Repeat 1-4 until the numbers are sorted.

3
Parallel Shear Sort
  • Shear sort is a classical sorting algorithm
    working in rounds on 2-dimensional meshes of
    processors. The basic idea of shear sort is to
    arrange the data into rows and columns in a gird
    allowing us to sort those rows and columns
    concurrently.
  • Let's assume for now that N is a perfect square.
    We organize the elements into an array of cells
    sqrt(N) by sqrt(N). On each sorting pass, we
    alternately sort rows and columns (pass 1 for
    rows, pass 2 for columns, pass 3 for rows, and so
    on). We sort odd numbered rows from left to right
    and sort even numbered rows from right to left.

4
????
  • http//www.cs.rit.edu/atk/Java/Sorting/sorting.ht
    ml
  • http//www.cs.mu.oz.au/498/notes/node31.html
  • http//pioneer.netserv.chula.ac.th/mveera/Algorit
    hmVisualization/SeniorProject2000/
  • http//www.nscollegeprep.cps.k12.il.us/depts/cs/dy
    anek/ap/programs/shearSort/index.html
Write a Comment
User Comments (0)
About PowerShow.com