a comparison of parallel sorting algorithms on different architectures nancy m. amato, ravishankar...

Post on 21-Jan-2016

218 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

A Comparison of Parallel Sorting Algorithms on Different ArchitecturesNancy M. Amato, Ravishankar Iyer, Sharad Sundaresan and Yan WuTexas A&M University

Hoang Bui

CMPS 5443

Overview Introduction Machine Descriptions Parallel Sorting Algorithms Experimental Results Comparisons and Recommendations

Introduction Sorting is one of the fundamental problems. Sequential sorting and Parallel sorting. Variety of parallel architectures. Experimental study of three algorithms:

Bitonic sort, sample sort & parallel radix sort. Apply to three different machines.

Machine Descriptions The MasPar MP1201. The nCUBE 2. The Sequent Balance.

The MasPar MP1201 SIMD machine. 2,048 processors, 1.8 MIPS, 16Kbytes RAM. Mesh based architecture. X-Net and Global Router for communication. Programming languages: C-Like and Fortran.

The nCUBE 2 MIMD machine. 64 processors, 7.5 MIPS 1Mbyte RAM. Hypercube architecture. Broadcasting. Language: C.

The Sequent Balance MIMD. Shared Memory 10 processors, 8 Kbytes RAM. Communicate through shared memory. Running Unix, language: C.

Parallel Sorting Algorithms Bitonic Sort. Sample Sort. Parallel Radix Sort.

Bitonic Sort Bitonic Sequence:

Is the concatenation of an ascending and descending sequence of numbers.

Example: 2,4,6,8,9,24,6,3,2,0. Algorithm:

Convert n numbers into a bitonic sequence with n/2 numbers in an increasing subsequence.

Merge into an ordered sequence (increasing or decreasing.)

Sample sort Algorithm:

Select p-1 splitters p buckets. Each number is put into the appropriate bucket. Sort each buckets.

Parallel Radix Sort Example list:

170, 45, 75, 90, 2, 24, 802, 66 Algorithm:

sorting by least significant digit (1s place) gives:170, 90, 2, 802, 24, 45, 75, 66.

sorting by next digit (10s place) gives:2, 802, 24, 45, 66, 170, 75, 90 .

sorting by most significant digit (100s place) gives:2, 24, 45, 66, 75, 90, 170, 802

Experimental Results Make modifications to each machine. Code was written in C. Keys are randomly generated 32 bit integers. Repeat 25 times and calculate the average.

The MasPar MP1202 – Bitonic sort Good speed-ups for all input size.

The MasPar MP1202 – Sample sort Also good speed-ups.

The MasPar MP1202 – Radix sort Shortest time for the MasPar MP1202.

The MasPar MP1202 Comparisons:

The nCUBE 2 – Bitonic Sort

The nCUBE 2 – Sample Sort

The nCUBE 2 – Radix Sort

The nCUBE 2

The Sequent Balance – Bitonic sort

The Sequent Balance – Sample sort

The Sequent Balance – Radix sort

The Sequent Balance

Comparisons and Recommendations MasPar MP1202:

Bitonic Sort for smaller input size. Parallel Radix Sort for larger input size.

nCUBBE 2: Sample Sort is the best.

Sequent Balance: Sample Sort for smaller input size. Parallel Radix Sort for larger input size.

Question

top related