Cilkstroke:Fork-Join并行程序内存高水位分析算法
Cilkmem: Algorithms for Analyzing the Memory High-Water Mark of Fork-Join Parallel Programs
摘要:
软件工程师设计的递归fork-join程序运行在大规模并行计算系统上,必须认识到他们的程序的内存需求如何在多处理器执行的规模。尽管存在用于测量并行程序的一个特定执行期间的内存使用的工具,但是这样的工具不能约束所有可能的并行执行上的最坏情况的内存使用。本文介绍了Cilkstrike,一个工具,分析一个确定性的Cilk程序的执行,以确定其$p$ -处理器内存高水位线(MHWM),这是最坏情况下的内存使用的程序超过\emph{all possible} $p$ -处理器执行。Cilkwords采用两种新的算法来计算$p$处理器MHWM。第一种算法在$O(T_1 \cdot p)$时间内计算精确的$p$ -处理器MHWM,其中$T_1$是程序的总工作。第二种算法在$O(T_1)$时间内解决近似阈值问题,该问题对于给定的存储器阈值$M$询问$p$处理器MHWM是否超过$M/2$或是否保证小于$M$。这两种算法都是内存高效的,分别需要$O(p \cdot D)$和$O(D)$空间,其中$D$是程序在单个线程上执行的最大调用堆栈深度。我们的实证研究表明,Cilkestra一般表现出较低的管理费用。在Cilkbench套件的十个应用程序基准测试中,精确算法导致$p=128$的$1.54$的几何平均乘法开销,而近似阈值算法导致独立于$p$的$1.36$的开销。此外,我们使用Cilkwords来揭示和诊断一个以前未知的问题,在一个大型的图像对齐程序的并行执行下,意外高的内存使用。
英文摘要:
Software engineers designing recursive fork-join programs destined to run on massively parallel computing systems must be cognizant of how their program's memory requirements scale in a many-processor execution. Although tools exist for measuring memory usage during one particular execution of a parallel program, such tools cannot bound the worst-case memory usage over all possible parallel executions. This paper introduces Cilkmem, a tool that analyzes the execution of a deterministic Cilk program to determine its $p$-processor memory high-water mark (MHWM), which is the worst-case memory usage of the program over \emph{all possible} $p$-processor executions. Cilkmem employs two new algorithms for computing the $p$-processor MHWM. The first algorithm calculates the exact $p$-processor MHWM in $O(T_1 \cdot p)$ time, where $T_1$ is the total work of the program. The second algorithm solves, in $O(T_1)$ time, the approximate threshold problem, which asks, for a given memory threshold $M$, whether the $p$-processor MHWM exceeds $M/2$ or whether it is guaranteed to be less than $M$. Both algorithms are memory efficient, requiring $O(p \cdot D)$ and $O(D)$ space, respectively, where $D$ is the maximum call-stack depth of the program's execution on a single thread. Our empirical studies show that Cilkmem generally exhibits low overheads. Across ten application benchmarks from the Cilkbench suite, the exact algorithm incurs a geometric-mean multiplicative overhead of $1.54$ for $p=128$, whereas the approximation-threshold algorithm incurs an overhead of $1.36$ independent of $p$. In addition, we use Cilkmem to reveal and diagnose a previously unknown issue in a large image-alignment program contributing to unexpectedly high memory usage under parallel executions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。