arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1607.00850cs.MS
收藏

湍流伪谱DNS代码的Python大规模并行实现

Massively parallel implementation in Python of a pseudo-spectral DNS code for turbulent flows

Mikael Mortensen

摘要:

Navier-Stokes方程的直接数值模拟(DNS)是流体动力学中一种有价值的研究工具,但公开可用的代码非常少,而且由于大量的数字运算,代码通常用低级语言编写。在这项工作中,描述了\textasciitilde{} 100行标准科学Python DNS代码,该代码几乎与纯C的性能相匹配,用于数千个处理器和数十亿个未知数。通过优化Cython中的一些例程,发现它与C++中从头开始实现的或多或少相同的求解器的性能相匹配。求解器效率的关键是网格分解和三维FFT例程,使用MPI直接在Python中实现,通过MPI for Python包装,以及串行FFT模块(可以使用numpy.fft或pyFFTW)。两个流行的分解策略,板和铅笔,已经实施和测试。

英文摘要:

Direct Numerical Simulations (DNS) of the Navier Stokes equations is a valuable research tool in fluid dynamics, but there are very few publicly available codes and, due to heavy number crunching, codes are usually written in low-level languages. In this work a \textasciitilde{}100 line standard scientific Python DNS code is described that nearly matches the performance of pure C for thousands of processors and billions of unknowns. With optimization of a few routines in Cython, it is found to match the performance of a more or less identical solver implemented from scratch in C++. Keys to the efficiency of the solver are the mesh decomposition and three dimensional FFT routines, implemented directly in Python using MPI, wrapped through MPI for Python, and a serial FFT module (both numpy.fft or pyFFTW may be used). Two popular decomposition strategies, slab and pencil, have been implemented and tested.

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

↑