SoAx: A generic C++ Structure of Arrays for handling Particles in HPC Codes

10/10/2017
by   Holger Homann, et al.
0

The numerical study of physical problems often require integrating the dynamics of a large number of particles evolving according to a given set of equations. Particles are characterized by the information they are carrying such as an identity, a position other. There are generally speaking two different possibilities for handling particles in high performance computing (HPC) codes. The concept of an Array of Structures (AoS) is in the spirit of the object-oriented programming (OOP) paradigm in that the particle information is implemented as a structure. Here, an object (realization of the structure) represents one particle and a set of many particles is stored in an array. In contrast, using the concept of a Structure of Arrays (SoA), a single structure holds several arrays each representing one property (such as the identity) of the whole set of particles. The AoS approach is often implemented in HPC codes due to its handiness and flexibility. For a class of problems, however, it is know that the performance of SoA is much better than that of AoS. We confirm this observation for our particle problem. Using a benchmark we show that on modern Intel Xeon processors the SoA implementation is typically several times faster than the AoS one. On Intel's MIC co-processors the performance gap even attains a factor of ten. The same is true for GPU computing, using both computational and multi-purpose GPUs. Combining performance and handiness, we present the library SoAx that has optimal performance (on CPUs, MICs, and GPUs) while providing the same handiness as AoS. For this, SoAx uses modern C++ design techniques such template meta programming that allows to automatically generate code for user defined heterogeneous data structures.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/16/2019

Memory-Efficient Object-Oriented Programming on GPUs

Object-oriented programming is often regarded as too inefficient for hig...
research
04/28/2017

Particle-based and Meshless Methods with Aboria

Aboria is a powerful and flexible C++ library for the implementation of ...
research
10/29/2020

Systolic Computing on GPUs for Productive Performance

We propose a language and compiler to productively build high-performanc...
research
07/12/2023

Cornerstone: Octree Construction Algorithms for Scalable Particle Simulations

This paper presents an octree construction method, called Cornerstone, t...
research
10/12/2020

On the performance of a highly-scalable Computational Fluid Dynamics code on AMD, ARM and Intel processors

No area of computing is hungrier for performance than High Performance C...
research
10/13/2020

mdspan in C++: A Case Study in the Integration of Performance Portable Features into International Language Standards

Multi-dimensional arrays are ubiquitous in high-performance computing (H...
research
07/07/2023

High-performance evaluation of high angular momentum 4-center Gaussian integrals on modern accelerated processors

We present a high-performance evaluation method for 4-center 2-particle ...

Please sign up or login with your details

Forgot password? Click here to reset