Efficient Data Structures for a Hybrid Parallel and Vectorized Particle-in-Cell Code - Archive ouverte HAL Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2017

Efficient Data Structures for a Hybrid Parallel and Vectorized Particle-in-Cell Code

Résumé

The contribution of the present work relies on an innovative and judicious combination of several optimization techniques for achieving high performance when using automatic vectorization and hybrid MPI/OpenMP parallelism in a Particle-in-Cell (PIC) code. The domain of application is plasma physics: the code simulates 2d2v Vlasov-Poisson systems on Cartesian grids with periodic boundary conditions. Overall, our code processes 65 million particles/second per core on Intel Haswell (without hyper-threading) and achieves a good weak scaling up to 0.4 trillion particles on 8,192 cores. The optimizations mainly consist in using (i) a structure of arrays for the particles, (ii) an efficient data structure for the electric field and the charge density, and (iii) an appropriate code for automatic vectorization of the charge accumulation and of the positions' update. In particular, we use space-filling curves to enhance data locality while enabling vectorization: starting from a redundant cell-based data structure for the electric field and for the charge density, we compare several space-filling curves for an efficient ordering of these data and we obtain a gain of 36% in the number of L2 and L3 cache misses when using a Morton curve instead of the classical row-major one. In addition, by proposing a specific writing of the updating positions code we achieve a 31% time improvement in that step. The optimizations bring an overall gain in the execution time of 42% with respect to a standard code. The parallelization of the particle loops is simply performed by means of both distributed and shared memory paradigms, without domain decomposition. We explain the weak and the strong scalings of the code bounded as expected by the overhead of the MPI communications.
Fichier principal
Vignette du fichier
pdsec2.pdf (311.39 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-01504645 , version 1 (10-04-2017)
hal-01504645 , version 2 (18-04-2017)
hal-01504645 , version 3 (29-06-2017)

Identifiants

  • HAL Id : hal-01504645 , version 2

Citer

Yann Barsamian, Sever Adrian Hirstoaga, Eric Violard. Efficient Data Structures for a Hybrid Parallel and Vectorized Particle-in-Cell Code. 2017. ⟨hal-01504645v2⟩
609 Consultations
567 Téléchargements

Partager

Gmail Facebook X LinkedIn More