在x86架构上计算全对最短路径的增强型OpenMP算法
Enhanced OpenMP Algorithm to Compute All-Pairs Shortest Path on x86 Architectures
AI总结:
本文将面向Xeon Phi KNL的Floyd-Warshall并行代码移植并优化到通用Intel x86处理器,提出提高并发度的新优化,实验表明性能最多提升23%。
摘要:
图已成为在不同领域中建模和解决问题的关键工具。Floyd-Warshall(FW)算法计算图中所有顶点对之间的最短路径,并应用于通信网络、流量路由、生物信息学等领域。然而,FW在计算和空间上都很昂贵,因为它需要O(n^3)次操作和O(n^2)的内存空间。随着图变得越来越大,并行计算变得必要,以便在可接受的时间范围内提供解决方案。在本文中,我们研究了一个为Xeon Phi KNL处理器开发的FW代码,并对其进行了调整,使其能够在任何Intel x86处理器上运行,从而失去了前者的专用性。为此,我们逐一验证了原始代码提出的优化,在必要时对基础代码进行调整,并在两个Intel服务器上在不同测试场景下分析其性能。此外,提出了一种新的优化来提高并行算法的并发度,该优化使用两种不同的同步机制实现。实验结果表明,所有优化在所选择的两个x86平台上都是有益的。最后,新的优化方案将性能提高了最多23%。
英文摘要:
Graphs have become a key tool when modeling and solving problems in different areas. The Floyd-Warshall (FW) algorithm computes the shortest path between all pairs of vertices in a graph and is employed in areas like communication networking, traffic routing, bioinformatics, among others. However, FW is computationally and spatially expensive since it requires O(n^3) operations and O(n^2) memory space. As the graph gets larger, parallel computing becomes necessary to provide a solution in an acceptable time range. In this paper, we studied a FW code developed for Xeon Phi KNL processors and adapted it to run on any Intel x86 processors, losing the specificity of the former. To do so, we verified one by one the optimizations proposed by the original code, making adjustments to the base code where necessary, and analyzing its performance on two Intel servers under different test scenarios. In addition, a new optimization was proposed to increase the concurrency degree of the parallel algorithm, which was implemented using two different synchronization mechanisms. The experimental results show that all optimizations were beneficial on the two x86 platforms selected. Last, the new optimization proposal improved performance by up to 23%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。