High-performance Python']Python for crystallographic computing

被引:6
|
作者
Boulle, A. [1 ]
Kieffer, J. [2 ]
机构
[1] Ctr Europeen Ceram, CNRS, UMR 7315, Inst Rech Ceram, 12 Rue Atlantis, F-87068 Limoges, France
[2] European Synchrotron Radiat Facil, 71 Ave Martyrs, F-38000 Grenoble, France
关键词
computing; !text type='Python']Python[!/text; NumPy; compilers; X-RAY-DIFFRACTION; SCATTERING; VISUALIZATION; STRAIN;
D O I
10.1107/S1600576719008471
中图分类号
O6 [化学];
学科分类号
0703 ;
摘要
The Python programming language, combined with the numerical computing library NumPy and the scientific computing library SciPy, has become the de facto standard for scientific computing in a variety of fields. This popularity is mainly due to the ease with which a Python program can be written and executed (easy syntax, dynamical typing, no compilation etc.), coupled with the existence of a large number of specialized third-party libraries that aim to lift all the limitations of the raw Python language. NumPy introduces vector programming, improving execution speeds, whereas SciPy brings a wealth of highly optimized and reliable scientific functions. There are cases, however, where vector programming alone is not sufficient to reach optimal performance. This issue is addressed with dedicated compilers that aim to translate Python code into native and statically typed code with support for the multi-core architectures of modern processors. In the present article it is shown how these approaches can be efficiently used to tackle different problems, with increasing complexity, that are relevant to crystallography: the 2D Laue function, scattering from a strained 2D crystal, scattering from 3D nanocrystals and, finally, diffraction from films and multilayers. For each case, detailed implementations and explanations of the functioning of the algorithms are provided. Different Python compilers (namely NumExpr, Numba, Pythran and Cython) are used to improve performance and are benchmarked against state-of-the-art NumPy implementations. All examples are also provided as commented and didactic Python (Jupyter) notebooks that can be used as starting points for crystallographers curious to enter the Python ecosystem or wishing to accelerate their existing codes.
引用
收藏
页码:882 / 897
页数:16
相关论文
共 50 条
  • [1] Python']Python accelerators for high-performance computing
    Marowka, Ami
    JOURNAL OF SUPERCOMPUTING, 2018, 74 (04): : 1449 - 1460
  • [2] Python accelerators for high-performance computing
    Ami Marowka
    The Journal of Supercomputing, 2018, 74 : 1449 - 1460
  • [3] Scientific Computing With Python']Python on High-Performance Heterogeneous Systems INTRODUCTION
    Barba, Lorena A.
    Klockner, Andreas
    Ramachandran, Prabhu
    Thomas, Rollin
    COMPUTING IN SCIENCE & ENGINEERING, 2021, 23 (04) : 5 - 7
  • [4] Towards High-Performance Python']Python
    Marowka, Ami
    PARALLEL PROCESSING AND APPLIED MATHEMATICS (PPAM 2017), PT II, 2018, 10778 : 203 - 212
  • [5] High-Performance Computing on Mathematical Coprocessors and Graphics Accelerators Using Python']Python
    Borzunov, S.
    Romanov, A.
    Kurgalin, S.
    Petrishchev, K.
    PHYSICS OF PARTICLES AND NUCLEI, 2024, 55 (03) : 472 - 473
  • [6] bioScience: A new python']python science library for high-performance computing bioinformatics analytics
    Lopez-Fernandez, Aurelio
    Gomez-Vela, Francisco A.
    Gonzalez-Dominguez, Jorge
    Bidare-Divakarachari, Parameshachari
    SOFTWAREX, 2024, 26
  • [7] TFInterpy: A high-performance spatial interpolation Python']Python package
    Chen, Zhiwen
    Zhong, Baorong
    SOFTWAREX, 2022, 20
  • [8] PySR: high-performance symbolic regression in Python']Python and Julia
    Tonda, Alberto
    GENETIC PROGRAMMING AND EVOLVABLE MACHINES, 2025, 26 (01)
  • [9] On the Efficiency of Python']Python for High-Performance Computing: A Case Study Involving Stencil Updates for Partial Differential Equations
    Langtangen, Hans Petter
    Cai, Xing
    MODELING, SIMULATION AND OPTIMIZATION OF COMPLEX PROCESSES, 2008, : 337 - 357
  • [10] High performance development for high end computing with Python']Python language wrapper (PLW)
    Luszczek, Piotr
    Dongarra, Jack
    INTERNATIONAL JOURNAL OF HIGH PERFORMANCE COMPUTING APPLICATIONS, 2007, 21 (03): : 360 - 369