(133c) Memory Optimization for Particle Access in CFD-DEM Simulations
AIChE Annual Meeting
2020
2020 Virtual AIChE Annual Meeting
Particle Technology Forum
Fluidization: Industrial Application of Computational and Numerical Approaches to Particle Flow
Tuesday, November 17, 2020 - 8:30am to 8:45am
The use of the Morton [1] space-filling curve to improve memory access patterns in the particle data structure is described, and their impact on the performance of representative CFD-DEM simulations is presented. The Morton space-filling curve was applied to co-located particles on uniform and non-uniform k-dimensional tree [2] generated cartesian grids. This optimization technique was applied to reorder the particle data-structure to improve spatial and temporal locality in memory. The performance impact of this technique when applied to two benchmarks cases: the homogeneous cooling system [3] and fluidized bed are presented. This optimization technique leads to a two-fold performance improvement in operations that involve accessing the particle data structure, such as creation of neighbor lists, collisional force calculation and inter-processor data exchange. An example case of a homogeneous cooling system simulation where particles are spatially distributed by thermal motion is described in the attached figure. The particle index, which associates to the position in memory, is not correlated with its spatial location without reordering, leading to cache misses and memory access inefficiencies. On the other hand, spatial reordering of the particle data-structure leads to a twenty percent overall improvement in performance. Some frequently performed operations, such as building neighbor lists, exhibit a significant improvement (about two times) while the expense of reordering particles remains negligible (~ 6% of overall run-time).
References:
[1] D. W. Walker, Morton ordering of 2d arrays for efficient access to hierarchical memory, The International Journal of High Performance Computing Applications 32 (1) (2018) 189â203.
[2] M. Grandin, Data structures and algorithms for high-dimensional structured adaptive mesh refinement, Advances in Engineering Software 82 (2015) 75â86.
[3] W. Fullmer, C. Hrenya, The homogeneous cooling state as a verification test for kinetic-theory-based continuum models of gas-solid flows, Journal of Verification, Validation and Uncertainty Quantification 2 (4) (2017) 044501.