Performance Optimisation of Smoothed Particle Hydrodynamics Algorithms for Multi/Many-Core Architectures

We describe a strategy for code modernisation of Gadget, a widely used community code for computational astrophysics. The focus of this work is on node-level performance optimisation, targeting current multi/many-core Intel® architectures. We identify and isolate a sample code kernel, which is representative of a typical Smoothed Particle Hydrodynamics (SPH) algorithm. The code modifications include threading parallelism optimisation, change of the data layout into Structure of Arrays (SoA), auto-vectorisation and algorithmic improvements in the particle sorting. We obtain shorter execution time and improved threading scalability both on Intel Xeon® (2.6× on Ivy Bridge) and Xeon Phi™ (13.7× on Knights Corner) systems. First few tests of the optimised code result in 19.1× faster execution on second generation Xeon Phi (Knights Landing), thus demonstrating the portability of the devised optimisation solutions to upcoming architectures.

[1]  Nick Kaiser,et al.  Evolution and clustering of rich clusters , 1986 .

[2]  Frazer R. Pearce,et al.  Major mergers going Notts: challenges for modern halo finders , 2015, 1506.01405.

[3]  Nikola Tchipev,et al.  Exploiting the Space Filling Curve Ordering of Particles in the Neighbour Search of Gadget3 , 2018, PARCO.

[4]  C. A. R. Hoare,et al.  Algorithm 65: find , 1961, Commun. ACM.

[5]  Gerhard Wellein,et al.  LIKWID: Lightweight Performance Tools , 2011, CHPC.

[6]  Herb Sutter,et al.  The Free Lunch Is Over A Fundamental Turn Toward Concurrency in Software , 2013 .

[7]  Stefan Gottloeber,et al.  Galaxies in N-Body Simulations: Overcoming the Overmerging Problem , 1997, astro-ph/9708191.

[8]  V. Springel The Cosmological simulation code GADGET-2 , 2005, astro-ph/0505010.

[9]  Volker Springel,et al.  Larger, faster, better: Current trends in cosmological simulations , 2012 .

[10]  E. Bertschinger SIMULATIONS OF STRUCTURE FORMATION IN THE UNIVERSE , 1998 .

[11]  Frazer R. Pearce,et al.  nIFTy galaxy cluster simulations – I. Dark matter and non-radiative models , 2015, 1503.06065.

[12]  Padova,et al.  Populating a cluster of galaxies - I. Results at z=0 , 2000, astro-ph/0012055.

[13]  V. Springel,et al.  Substructures in hydrodynamical cluster simulations , 2008, 0808.3401.

[14]  S. Borgani,et al.  An improved SPH scheme for cosmological simulations , 2015, 1502.07358.

[15]  W. Dehnen,et al.  Improving convergence in smoothed particle hydrodynamics simulations without pairing instability , 2012, 1204.2471.