Preprints
https://doi.org/10.5194/gmd-2021-216
https://doi.org/10.5194/gmd-2021-216

Submitted as: development and technical paper 23 Aug 2021

Submitted as: development and technical paper | 23 Aug 2021

Review status: a revised version of this preprint was accepted for the journal GMD.

MagIC v5.10: a two-dimensional MPI distribution for pseudo-spectral magneto hydrodynamics simulations in spherical geometry

Rafael Lago1, Thomas Gastine2, Tilman Dannert1, Markus Rampp1, and Johannes Wicht3 Rafael Lago et al.
  • 1Max Planck Computing and Data Facility, Gießenbachstraße 2, 85748 Garching, Germany
  • 2Institut de Physique du Globe de Paris, Université de Paris, CNRS, F-75005 Paris, France
  • 3Max Planck Institute for Solar System Research, Justus-von-Liebig-Weg 3, 37077 Göttingen, Germany

Abstract. We discuss two parallelization schemes for MagIC, an open-source, high-performance, pseudo-spectral code for the numerical solution of the magneto hydrodynamics equations in a rotating spherical shell. MagIC calculates the non-linear terms on a numerical grid in spherical coordinates while the time step updates are performed on radial grid points with a spherical harmonic representation of the lateral directions. Several transforms are required to switch between the different representations. The established hybrid implementation of MagIC uses MPI-parallelization in radius and relies on existing fast spherical transforms using OpenMP. Our new two-dimensional MPI decomposition implementation also distributes the latitudes or the azimuthal wavenumbers across the available MPI tasks/compute cores. We discuss several non-trivial algorithmic optimizations and the different data distribution layouts employed by our scheme. In particular, the two-dimensional distribution data layout yields a code that strongly scales well beyond the limit of the current one-dimensional distribution. We also show that the two-dimensional distribution implementation, although not yet fully optimized, can already be faster than the existing finely optimized hybrid implementation when using many thousands of CPU cores. Our analysis indicates that the two-dimensional distribution variant can be further optimized to also surpass the performance of the one-dimensional distribution for a few thousand cores.

Rafael Lago et al.

Status: final response (author comments only)

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
  • RC1: 'Comment on gmd-2021-216', Anonymous Referee #1, 21 Sep 2021
    • AC1: 'Reply on RC1', Rafael Lago, 11 Oct 2021
      • AC4: 'Reply on AC1', Rafael Lago, 20 Oct 2021
  • RC2: 'Comment on gmd-2021-216', Anonymous Referee #2, 24 Sep 2021
    • AC2: 'Reply on RC2', Rafael Lago, 11 Oct 2021
      • AC3: 'Reply on AC2', Rafael Lago, 20 Oct 2021

Rafael Lago et al.

Rafael Lago et al.

Viewed

Total article views: 383 (including HTML, PDF, and XML)
HTML PDF XML Total BibTeX EndNote
309 64 10 383 3 0
  • HTML: 309
  • PDF: 64
  • XML: 10
  • Total: 383
  • BibTeX: 3
  • EndNote: 0
Views and downloads (calculated since 23 Aug 2021)
Cumulative views and downloads (calculated since 23 Aug 2021)

Viewed (geographical distribution)

Total article views: 332 (including HTML, PDF, and XML) Thereof 332 with geography defined and 0 with unknown origin.
Country # Views %
  • 1
1
 
 
 
 
Latest update: 22 Oct 2021
Download
Short summary
In this work we discuss a two-dimensional distributed parallelization of MagIC, an open-source code for the numerical solution of the magneto hydrodynamics equations. Such a parallelization involves several challenges concerning the distribution of work and data. We detail our algorithm and compare it with the established, optimized, one-dimensional distribution in the context of the dynamo benchmark and discuss the merits of both implementations.