用协处理器加速有限速率化学动力学:比较GPU、MIC和CPU上的矢量化方法
Accelerating finite-rate chemical kinetics with coprocessors: comparing vectorization methods on GPUs, MICs, and CPUs
摘要:
高效的化学动力学常微分方程求解器必须考虑底层硬件的可用线程和并行级并行性,特别是在众核协处理器上,以及数值效率。使用OpenCL实现了刚性Rosenbrock和非刚性Runge-Kutta求解器,使用单指令多线程(SIMT)和单指令多数据(SIMD)范式。这些并行实现的性能进行了测量,在几个多核和众核平台上的三个化学动力学模型。进行了两个运行时基准测试,以清楚地确定任何一种方法提供的性能优势:并行评估右侧源项,并使用Rosenbrock和Runge-Kutta求解器集成一系列恒压均质反应器。在主机多核Xeon CPU和众核Xeon Phi协处理器上使用SIMD并行性进行的右侧评估的执行速度比基线多线程代码快约三倍。主机和Phi上的SIMT模型比基线慢13-35%,而GPU上的SIMT模型提供了与Phi上的SIMD模型大致相同的性能。与基线并行代码相比,两个ODE求解器的运行时间减少了2.5- 2.7倍(在主机CPU上实现SIMD)和4.7- 4.9倍(使用Xeon Phi协处理器)。GPU上的SIMT实现比基准多线程CPU代码快1.4-1.6倍;然而,这比主机CPU或Xeon Phi上的SIMD版本慢得多。三个平台之间的性能差异归因于ODE积分器内的自适应步长引起的线程发散。分析表明,GPU的更宽矢量宽度比更窄的Sandy Bridge或Xeon Phi产生更高的发散水平。
英文摘要:
Efficient ordinary differential equation solvers for chemical kinetics must 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 nonstiff Runge-Kutta solver are implemented using the single instruction, multiple thread (SIMT) and single instruction, multiple data (SIMD) paradigms with OpenCL. The performances of these parallel implementations were measured with three chemical kinetic models across several multicore and many-core platforms. Two runtime benchmarks were conducted to clearly determine any performance advantage offered by either method: evaluating the right-hand-side source terms in parallel, and integrating 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 code. The SIMT model on the host and Phi was 13-35% slower than the baseline while the SIMT model on the GPU provided approximately the same performance as the SIMD model on the Phi. The runtimes for both ODE solvers decreased 2.5-2.7x with the SIMD implementations on the host CPU and 4.7-4.9x with the Xeon Phi coprocessor compared to the baseline parallel code. The SIMT implementations on the GPU ran 1.4-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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。