High performance Python']Python for direct numerical simulations of turbulent flows

被引:31
|
作者
Mortensen, Mikael [1 ]
Langtangen, Hans Petter
机构
[1] Univ Oslo, Moltke Moes Vei 35, N-0851 Oslo, Norway
关键词
CFD; !text type='Python']Python[!/text; Cython; DNS; Slab; Pencil; FFT; MPI;
D O I
10.1016/j.cpc.2016.02.005
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Direct Numerical Simulations (DNS) of the Navier Stokes equations is an invaluable research tool in fluid dynamics. Still, there are few publicly available research codes and, due to the heavy number crunching implied, available codes are usually written in low-level languages such as C/C++ or Fortran. In this paper we describe a pure scientific Python pseudo-spectral DNS code that nearly matches the performance of C++ for thousands of processors and billions of unknowns. We also describe a version optimized through Cython, that is found to match the speed of C++. The solvers are written from scratch in Python, both the mesh, the MPI domain decomposition, and the temporal integrators. The solvers have been verified and benchmarked on the Shaheen supercomputer at the KAUST supercomputing laboratory, and we are able to show very good scaling up to several thousand cores. A very important part of the implementation is the mesh decomposition (we implement both slab and pencil decompositions) and 3D parallel Fast Fourier Transforms (FFT). The mesh decomposition and FFT routines have been implemented in Python using serial FFT routines (either NumPy, pyFFTW or any other serial FFT module), NumPy array manipulations and with MPI communications handled by MPI for Python (mpi4py). We show how we are able to execute a 3D parallel FFT in Python for a slab mesh decomposition using 4 lines of compact Python code, for which the parallel performance on Shaheen is found to be slightly better than similar routines provided through the FFTW library. For a pencil mesh decomposition 7 lines of code is required to execute a transform. (C) 2016 Elsevier B.V. All rights reserved.
引用
收藏
页码:53 / 65
页数:13
相关论文
共 50 条
  • [1] Direct Numerical Simulations of Turbulent Shear Flows
    Sandberg, Richard D.
    [J]. HIGH PERFORMANCE COMPUTING ON VECTOR SYSTEMS 2009, 2010, : 151 - 165
  • [2] Towards High-Performance Python']Python
    Marowka, Ami
    [J]. PARALLEL PROCESSING AND APPLIED MATHEMATICS (PPAM 2017), PT II, 2018, 10778 : 203 - 212
  • [3] Optics simulations with Python']Python: Diffraction
    Ammar, Ahmed
    Burman, Ritambhar
    Ghalila, Hassen
    Ben Lakhdar, Zohra
    Varadharajan, L. Srinivasa
    Lahmar, Souad
    Lakshminarayanan, Vasudevan
    [J]. EDUCATION AND TRAINING IN OPTICS AND PHOTONICS: ETOP 2015, 2015, 9793
  • [4] PROGRESS IN DIRECT NUMERICAL SIMULATIONS OF TURBULENT REACTING FLOWS
    JOU, WH
    RILEY, JJ
    [J]. AIAA JOURNAL, 1989, 27 (11) : 1543 - 1556
  • [5] Optics Simulations: A Python']Python Workshop
    Ghalila, H.
    Ammar, A.
    Varadharajan, S.
    Majdi, Y.
    Zghal, M.
    Lahmar, S.
    Lakshminarayanan, V.
    [J]. 14TH CONFERENCE ON EDUCATION AND TRAINING IN OPTICS AND PHOTONICS (ETOP 2017), 2017, 10452
  • [6] High-performance Python']Python for crystallographic computing
    Boulle, A.
    Kieffer, J.
    [J]. JOURNAL OF APPLIED CRYSTALLOGRAPHY, 2019, 52 : 882 - 897
  • [7] Python']Python accelerators for high-performance computing
    Marowka, Ami
    [J]. JOURNAL OF SUPERCOMPUTING, 2018, 74 (04): : 1449 - 1460
  • [8] Direct numerical simulations of viscoelastic turbulent channel flows at high drag reduction
    Housiadas, KD
    Beris, AN
    [J]. KOREA-AUSTRALIA RHEOLOGY JOURNAL, 2005, 17 (03) : 131 - 140
  • [9] pypet: a python toolkit for simulations and numerical experiments
    Robert Meyer
    Klaus Obermayer
    [J]. BMC Neuroscience, 16 (Suppl 1)
  • [10] Powering Practical Performance: Accelerated Numerical Computing in Pure Python']Python
    Penn, Matthew
    Milroy, Chris
    [J]. 2022 IEEE HIGH PERFORMANCE EXTREME COMPUTING VIRTUAL CONFERENCE (HPEC), 2022,