不带成对元素交换的并行快速排序
Parallel Quicksort without Pairwise Element Exchange
摘要:
Quicksort是一种在分布式内存并行计算机上进行并行排序的指导性课堂方法,有很多机会说明特定的实现方案和与MPI等常见通信接口的权衡。标准的分布式内存快速排序实现在快速排序递归的每一级交换分区的数据元素。在本文中,我们证明这是不必要的:只分配所选的枢轴就足够了,并将元素重新分配推迟到递归的底部。这减少了从$O(n\log p)$到$O(n)$交换的数据的总量,$n$是要排序的元素的总数,$p$是处理器的2的幂数,这是通过权衡总共$O(p)$附加的枢轴元素分布来实现的。基于这一观察,我们描述了新的,\emph{exchange-free}实施变种的并行快速排序和Wagar的HyperQuicksort。我们已经实现了讨论的四个不同的快速排序的变化在MPI中,并表明,良好的枢轴选择,快速排序没有成对的元素交换可以显着快于标准的实现中等规模的问题。
英文摘要:
Quicksort is an instructive classroom approach to parallel sorting on distributed memory parallel computers with many opportunities for illustrating specific implementation alternatives and tradeoffs with common communication interfaces like MPI. The (two) standard distributed memory Quicksort implementations exchange partitioned data elements at each level of the Quicksort recursion. In this note, we show that this is not necessary: It suffices to distribute only the chosen pivots, and postpone element redistribution to the bottom of the recursion. This reduces the total volume of data exchanged from $O(n\log p)$ to $O(n)$, $n$ being the total number of elements to be sorted and $p$ a power-of-two number of processors, by trading off against a total of $O(p)$ additional pivot element distributions. Based on this observation, we describe new, \emph{exchange-free} implementation variants of parallel Quicksort and of Wagar's HyperQuicksort. We have implemented the discussed four different Quicksort variations in MPI, and show that with good pivot selection, Quicksort without pairwise element exchange can be significantly faster than standard implementations on moderately large problems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。