[论文解读] Parallelize Bubble and Merge Sort Algorithms Using Message Passing Interface (MPI)
本文提出了一种基于消息传递接口(MPI)的并行冒泡排序与归并排序实现,旨在提升多核系统上的排序性能。通过根据单词长度将输入数据分配到子数组,并利用Intel i7-3610QM(8个CPU)上的MPI进行计算,作者评估了两种数据结构——字符串向量与三维数组——的结果表明,三维数组方法因减少了内存访问开销而表现出更优性能。
Sorting has been a profound area for the algorithmic researchers and many resources are invested to suggest more works for sorting algorithms. For this purpose, many existing sorting algorithms were observed in terms of the efficiency of the algorithmic complexity. In this paper we implemented the bubble and merge sort algorithms using Message Passing Interface (MPI) approach. The proposed work tested on two standard datasets (text file) with different size. The main idea of the proposed algorithm is distributing the elements of the input datasets into many additional temporary sub-arrays according to a number of characters in each word. The sizes of each of these sub-arrays are decided depending on a number of elements with the same number of characters in the input array. We implemented MPI using Intel core i7-3610QM ,(8 CPUs),using two approaches (vectors of string and array 3D) . Finally, we get the data structure effects on the performance of the algorithm for that we choice the second approach.
研究动机与目标
- 通过在多核架构上使用MPI进行并行化,提升排序效率。
- 研究数据结构设计(字符串向量与三维数组)在分布式环境中对排序性能的影响。
- 评估并行化冒泡排序与归并排序在不同大小标准数据集上的可扩展性与性能表现。
- 确定基于单词长度特征将输入数据分配到各进程的最优方法。
提出的方法
- 根据每个单词的字符数将输入数据集划分为子数组,以在各进程间实现负载均衡。
- 使用MPI将数据分发到Intel i7-3610QM处理器的8个CPU上运行的进程,并协调进程间通信。
- 实现两种数据结构:字符串向量与三维数组,以对比内存访问模式与性能表现。
- 独立地使用MPI对冒泡排序与归并排序算法进行并行化,各子数组在本地排序后,对归并排序进行最终合并。
- 通过不同大小的标准文本文件,测量并比较两种数据结构的性能表现。
- 最终根据执行时间与内存访问效率,确定性能更优的实现方法。
实验结果
研究问题
- RQ1基于单词长度进行数据划分在MPI并行排序中如何影响负载均衡?
- RQ2在MPI中存储与排序分布式数据时,使用字符串向量与三维数组的性能差异是什么?
- RQ3在多核系统上通过MPI并行化后,冒泡排序与归并排序的可扩展性如何?
- RQ4数据结构设计在并行排序中如何最小化通信与内存开销?
主要发现
- 三维数组数据结构因内存局部性提升与访问开销减少,性能优于字符串向量。
- 并行归并排序在大规模数据集上表现出更好的可扩展性与更低的执行时间,优于并行冒泡排序。
- 基于单词长度的数据划分有效平衡了各进程的工作负载,提升了整体效率。
- 基于MPI的实现成功缩短了多核系统上的排序时间,在大规模输入下实现了可测量的性能提升。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。