Parallel summation of symmetric inter-particle forces in smoothed particle hydrodynamics
In the smoothed particle hydrodynamics (SPH) method, the forces between all particles are efficiently summed up in a serial environment as follows. Each pair of particles is considered once. The resulting inter-particle force is computed and then the contributions to both particles are updated, taking into account the symmetry of the problem. This algorithm is difficult to parallelise when concurrently accessing the same memory location in a multi-threaded process. We develop a parallel 1D summation algorithm consisting of two passes on a Cartesian grid of cells in which particles move freely. In a first pass, we consider all cells with an even index n. We compute the inter-particle forces for all pairs of particles located in cell n and those pairs where a particle is located in cell n and another particle is located in cell n + 1. Each cell n is handled by a different thread since no data race can occur. In a second pass, we do the same for cells with odd n. This way, all interparticle forces are computed. We generalise this algorithm to 2D, 3D, and arbitrarily high dimensions and report performance results on three different shared-memory platforms using the OpenMP programming paradigm.
Key wordsSmoothed particle hydrodynamics symmetry computational fluid dynamics parallel computation
Unable to display preview. Download preview PDF.
The collaboration with the Institute for Hydraulic Engineering and Water Resources Management is carried out within the Flowrun project funded by the section Simulation Sciences of the Jülich-Aachen Research Alliance (JARA-SIM).
- 1.B. Chapman, G. Jost, and R. van der Pas, Using OpenMP: Portable Shared Memory Parallel Programming, The MIT Press, 2007.Google Scholar
- 2.J. A. Faber and F. A. Rasio, Post-Newtonian SPH calculations of binary neutron star coalescence: Method and first results, Phys. Rev. D 62 (2000), no. 6, 064012.Google Scholar
- 5.M. Gómez-Gesteira, B. D. Rogers, R. A. Dalrymple, A. J. C. Crespo, and M. Narayanaswamy, User guide for the SPHysics code v1.2, 2008.Google Scholar
- 8.P. Maruzewski, D. Le Touzé, G. Oger, and F. Avellan, SPH high-performance computing simulations of rigid solids impacting the free-surface of water, Journal of Hydraulic Research 48 (2010), in Press.Google Scholar
- 11.R. Speith, E. Schnetter, S. Kunze, and H. Riffert,Distributed implementation of SPH for simulations of accretion disks, Molecular Dynamics On Parallel Computers, Proceedings of the NIC-Workshop, Jülich, February 8–10, 1999 (Singapore), World Scientific Publishing Co., 2000, pp. 276–285.Google Scholar
- 14.D. W. Walker and J. J. Dongarra, MPI: a standard Message Passing Interface, Supercomputer 12 (1996), no. 1, 56–68.Google Scholar
- 15.J. Willkomm and H. M. Bücker, A shared-memory parallel smoothed particle hydrodynamics simulation, Proceedings of the 28th International Conference of the Chilean Computing Science Society, Santiago de Chile, Chile, November 9–14, 2009, 2009, pp. 41–48.Google Scholar