Accelerating finite-rate chemical kinetics with coprocessors: comparing vectorization methods on GPUs, MICs, and CPUs

Accelerating finite-rate chemical kinetics with coprocessors: comparing vectorization methods on GPUs, MICs, and CPUs
复制标题

DOI:
10.1016/j.cpc.2018.01.015
复制
发表时间:
2016-08
期刊:
Comput. Phys. Commun.
影响因子:
--
通讯作者:
C. Stone;Kyle E. Niemeyer
C. Stone;Kyle E. Niemeyer
中科院分区:
其他
文献类型:
--
作者:
C. Stone;Kyle E. Niemeyer

文献摘要

相似文献

精确、高效地求解刚性常微分方程(ode)是有限速率化学湍流燃烧模拟的重要组成部分。控制每个网格点化学动力学的ode通过算子分裂解耦,允许每个ode同时求解。高效的ODE求解器必须考虑底层硬件的可用线程和指令级并行性,特别是在多核协处理器上,以及数值效率。刚性Rosenbrock和非刚性Runge-Kutta ODE求解器都使用OpenCL中的单指令多线程(SIMT)和单指令多数据(SIMD)范式实现。这两种方法都在同一指令流中并发地解决多个ode。这些并行实现的性能在三个化学动力学模型上进行了测量,这些模型在多个多核和数核平台上不断增加。我们进行了两个单独的基准测试,以清楚地确定两种方法所提供的性能优势。第一个基准测量了并行评估右侧源项的运行时间,第二个基准使用Rosenbrock和Runge-Kutta求解器集成了一系列恒压均匀反应堆。在主机多核Xeon CPU和多核Xeon Phi协处理器上使用SIMD并行性的右侧计算执行速度大约是基线多线程c++代码的三倍。主机和Phi上的SIMT并行模型比基线慢13%-35%,而NVIDIA Kepler GPU上的SIMT模型提供的性能与Phi上的SIMD模型大致相同。与基线并行代码相比,在主机CPU(2.5 - 2.7倍)和Xeon Phi协处理器(4.7 - 4.9倍)上的SIMD实现显著降低了两个ODE求解器的运行时间。GPU上的SIMT实现比基线多线程CPU代码快1.5-1.6倍;然而,这比主机CPU或Xeon Phi上的SIMD版本要慢得多。三个平台之间的性能差异归因于ODE积分器中自适应步长引起的线程分歧。分析表明,较宽的GPU矢量宽度比较窄的Sandy Bridge或Xeon Phi产生更高的发散水平。SIMD并行策略提供的显著性能改进促使进一步研究更多对SIMD友好且计算效率高的ODE求解器方法。
Accurate and efficient methods for solving stiff ordinary differential equations (ODEs) are a critical component of turbulent combustion simulations with finite-rate chemistry. The ODEs governing the chemical kinetics at each mesh point are decoupled by operator-splitting allowing each to be solved concurrently. An efficient ODE solver must then take into account the available thread and instruction-level parallelism of the underlying hardware, especially on many-core coprocessors, as well as the numerical efficiency. A stiff Rosenbrock and a nonstiff Runge–Kutta ODE solver are both implemented using the single instruction, multiple thread (SIMT) and single instruction, multiple data (SIMD) paradigms within OpenCL. Both methods solve multiple ODEs concurrently within the same instruction stream. The performance of these parallel implementations was measured on three chemical kinetic models of increasing size across several multicore and many-core platforms. Two separate benchmarks were conducted to clearly determine any performance advantage offered by either method. The first benchmark measured the run-time of evaluating the right-hand-side source terms in parallel and the second benchmark integrated a series of constant-pressure, homogeneous reactors using the Rosenbrock and Runge–Kutta solvers. The right-hand-side evaluations with SIMD parallelism on the host multicore Xeon CPU and many-core Xeon Phi co-processor performed approximately three times faster than the baseline multithreaded C++ code. The SIMT parallel model on the host and Phi was 13%–35% slower than the baseline while the SIMT model on the NVIDIA Kepler GPU provided approximately the same performance as the SIMD model on the Phi. The runtimes for both ODE solvers decreased significantly with the SIMD implementations on the host CPU (2.5–2.7×) and Xeon Phi coprocessor (4.7–4.9×) compared to the baseline parallel code. The SIMT implementations on the GPU ran 1.5–1.6 times faster than the baseline multithreaded CPU code; however, this was significantly slower than the SIMD versions on the host CPU or the Xeon Phi. The performance difference between the three platforms was attributed to thread divergence caused by the adaptive step-sizes within the ODE integrators. Analysis showed that the wider vector width of the GPU incurs a higher level of divergence than the narrower Sandy Bridge or Xeon Phi. The significant performance improvement provided by the SIMD parallel strategy motivates further research into more ODE solver methods that are both SIMD-friendly and computationally efficient.