现代计算机系统的特征是具有深层存储器层次结构,由主存、多层高速缓存以及其他专用类型的存储器组成。在并行和分布式系统中,该层次结构还会增加额外的存储层。计算科学应用能否在执行时间方面获得良好性能,取决于对这种多样化、层次化存储器的高效使用。本文重新探讨如何利用空间填充曲线来规定代表性科学应用中所用数据结构在存储器中的排列顺序;这些应用运行在由多核 CPU 集群及附带 GPU 构成的并行机器上。本研究检验如下假设:Hilbert 和 Morton 排序等空间填充曲线能够改善数据局部性,从而比基于行或列的排序产生更高效的数据移动。首先,本文给出性能结果,说明在何种应用参数设置和机器特征下上述结论成立,并依据应用如何与计算机硬件及底层软件交互来解释这些结果。本研究特别关注构成许多科学计算基础的基于模板(stencil)的应用。其次,本文考察空间填充曲线如何影响最近邻代码和基于模板代码中的数据共享。
英文摘要:
Modern computer systems are characterized by deep memory hierarchies, composed of main memory, multiple layers of cache, and other specialized types of memory. In parallel and distributed systems, additional memory layers are added to this hierarchy. Achieving good performance for computational science applications, in terms of execution time, depends on the efficient use of this diverse and hierarchical memory. This paper revisits the use of space-filling curves to specify the ordering in memory of data structures used in representative scientific applications executing on parallel machines containing clusters of multicore CPUs with attached GPUs. This work examines the hypothesis that space-filling curves, such as Hilbert and Morton ordering, can improve data locality and hence result in more efficient data movement than row or column-based orderings. First, performance results are presented that show for what application parameterizations and machine characteristics this is the case, and are interpreted in terms of how an application interacts with the computer hardware and low-level software. This research particularly focuses on the use of stencil-based applications that form the basis of many scientific computations. Second, how space-filling curves impact data sharing in nearest-neighbour and stencil-based codes is considered.
Load Balancing using Hilbert Space-filling Curves for Parallel Reservoir Simulations
负载均衡(网格分区)的目标是最小化总体计算和通信,并确保所有处理器具有相似的工作负载。几何方法通过使用单元的位置来划分网格,而拓扑方法与单元的连通性一起工作,其通常被描述为图。本文介绍了一种Hilbert空间填充曲线法。空间填充曲线是一条连续的曲线,它定义了一维空间和多维空间之间的映射。希尔伯特空间填充曲线是希尔伯特发现的一种特殊的空间填充曲线,它具有许多有用的特性,如良好的局部性,这意味着在多维空间中相互接近的两个对象在一维空间中也相互接近。这个属性可以为基于网格的并行应用程序中的通信建模。希尔伯特空间填充曲线方法的思想是将计算域映射到一维空间,将一维空间划分为一定的区间,并将同一区间内的所有单元分配给MPI。为了实现负载均衡方法,需要一个映射内核将高维坐标转换为标量值,还需要一个高效的一维分区模块,该模块划分一维空间并确保所有间隔具有相似的工作负载。将Hilbert空间填充曲线法与著名的图划分软件ParMETIS进行了比较。实验结果表明,本文提出的Hilbert空间填充曲线方法具有良好的划分质量。它已经应用于具有数十亿个单元的网格,并且在IBM Blue Gene/Q上获得了线性可扩展性。
A Morton-Type Space-Filling Curve for Pyramid Subdivision and Hybrid Adaptive Mesh Refinement
Universität zu Köln(科隆大学);Institute of Software Technology, German Aerospace Center (DLR)(德国航空航天中心软件技术研究所);Institut für Numerische Simulation (INS) and Hausdorff Center for Mathematics (HCM), Rheinische Friedrich-Wilhelms-Universität Bonn(波恩莱茵弗里德里希·威廉大学数值模拟研究所和豪斯多夫数学中心);Leibniz University Hannover, Institute of Applied Mathematics (IfAM)(汉诺威莱布尼茨大学应用数学研究所)