arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1707.07137cs.DC
收藏

AutOMP:面向变量的高性能科学码的自动OpenMP量化生成器

AutOMP: An Automatic OpenMP Parallelization Generator for Variable-Oriented High-Performance Scientific Codes

Gal Oren, Yehuda Ganan, Guy Malamud

摘要:

OpenMP是一个跨平台的API,它扩展了C、C++和Fortran,并为这些语言提供了共享内存并行平台。自20世纪90年代以来,许多核心和HPC技术在科学计算中的使用已经普及,现在已经参与了许多研究领域。相对容易实现的OpenMP,以及多核共享内存处理器(如英特尔至强融核)的发展,使OpenMP的并行化在现代化的过程中遗留代码的有利方法。传统的科学代码通常包含大量的物理数组,这些数组被代码例程使用和更新。在大多数情况下,这种代码的并行化集中在循环并行化上。这种并行化的一个关键步骤是决定并行化作用域中的哪些变量应该是私有的(因此每个线程将持有它们的副本),以及哪些变量应该在线程之间共享。另一个重要的步骤是在循环执行后找出哪些变量应该同步。在这项工作中,我们提出了一个自动的预处理器,这些阶段- AutOMP(自动OpenMP)。AutOMP识别循环中的所有变量赋值。这些变量将是私有的,除非赋值是依赖于循环索引变量的数组元素。然后,AutOMP会找到需要线程同步的位置,以及要使用哪个归约运算符。最后,程序提供了并行化命令,用于并行化循环。

英文摘要:

OpenMP is a cross-platform API that extends C, C++ and Fortran and provides shared-memory parallelism platform for those languages. The use of many cores and HPC technologies for scientific computing has been spread since the 1990s, and now takes part in many fields of research. The relative ease of implementing OpenMP, along with the development of multi-core shared memory processors (such as Intel Xeon Phi) makes OpenMP a favorable method for parallelization in the process of modernizing a legacy codes. Legacy scientific codes are usually holding large number of physical arrays which being used and updated by the code routines. In most of the cases the parallelization of such code focuses on loop parallelization. A key step in this parallelization is deciding which of the variables in the parallelized scope should be private (so each thread will hold a copy of them), and which variables should be shared across the threads. Other important step is finding which variables should be synchronized after the loop execution. In this work we present an automatic pre-processor that preforms these stages - AutOMP (Automatic OpenMP). AutOMP recognize all the variables assignments inside a loop. These variables will be private unless the assignment is of an array element which depend on the loop index variable. Afterwards, AutOMP finds the places where threads synchronization is needed, and which reduction operator is to be used. At last, the program provides the parallelization command to be used for parallelizing the loop.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑