A framework for parallel computational physics algorithms on multi-core: SPH in parallel

In this paper, a simulation framework that enables distributed numerical computing in multi-core shared-memory environments is presented. Using multiple threads allows a single memory image to be shared concurrently across cores but potentially introduces race conditions. Race conditions can be avoided by ensuring each core operates on an isolated memory block. This is usually achieved by running a different operating system process on each core, such as multiple MPI processes. However, we show that in many computational physics problems, memory isolation can also be enforced within a single process by leveraging spatial sub-division of the physical domain. A new spatial sub-division algorithm is presented that ensures threads operate on different memory blocks, allowing for in-place updates of state, with no message passing or creation of local variables during time stepping. Additionally, the developed framework controls task distribution dynamically ensuring an events based load balance. Results from fluid mechanics analysis using Smoothed Particle Hydrodynamics (SPH) are presented demonstrating linear performance with number of cores.

[1]  Nancy G. Leveson,et al.  An investigation of the Therac-25 accidents , 1993, Computer.

[2]  Patrick J. Fox,et al.  A pore‐scale numerical model for flow through porous media , 1999 .

[3]  Michael Mikolajczak,et al.  Designing And Building Parallel Programs: Concepts And Tools For Parallel Software Engineering , 1997, IEEE Concurrency.

[4]  William Gropp,et al.  Skjellum using mpi: portable parallel programming with the message-passing interface , 1994 .

[5]  Rohit Chandra,et al.  Parallel programming in openMP , 2000 .

[6]  J. Monaghan,et al.  Shock simulation by the particle method SPH , 1983 .

[7]  G. Rodrigue,et al.  Structured adaptive mesh refinement using leapfrog time integration on a staggered grid for ocean models , 2005 .

[8]  L. Hernquist,et al.  TREESPH: A Unification of SPH with the Hierarchical Tree Method , 1989 .

[9]  Satnam Singh,et al.  An Asynchronous Messaging Library for C , 2005 .

[10]  L. Libersky,et al.  Smoothed Particle Hydrodynamics: Some recent improvements and applications , 1996 .

[11]  A. Munjiza,et al.  NBS contact detection algorithm for bodies of similar size , 1998 .

[12]  Jong-Shinn Wu,et al.  Parallel DSMC method using dynamic domain decomposition , 2005 .

[13]  Eric Perkins,et al.  A fast contact detection algorithm insensitive to object sizes , 2001 .

[14]  Joseph P. Morris,et al.  Parallel simulations of pore-scale flow through porous media , 1999 .

[15]  L. Lucy A numerical approach to the testing of the fission hypothesis. , 1977 .

[16]  J. Monaghan Smoothed particle hydrodynamics , 2005 .

[17]  J. Monaghan,et al.  Smoothed particle hydrodynamics: Theory and application to non-spherical stars , 1977 .

[18]  J. Monaghan Simulating Free Surface Flows with SPH , 1994 .

[19]  Ha H. Bui,et al.  Lagrangian meshfree particles method (SPH) for large deformation and failure flows of geomaterial using elastic–plastic soil constitutive model , 2008 .

[20]  Hester Bijl,et al.  Fourth-Order Runge–Kutta Schemes for Fluid Mechanics Applications , 2005, J. Sci. Comput..

[21]  Guirong Liu,et al.  Smoothed Particle Hydrodynamics: A Meshfree Particle Method , 2003 .

[22]  J. Monaghan,et al.  A refined particle method for astrophysical problems , 1985 .

[23]  Wei Lu,et al.  Developing a concurrent service orchestration engine in ccr , 2008, IWMSE '08.

[24]  G. Amdhal,et al.  Validity of the single processor approach to achieving large scale computing capabilities , 1967, AFIPS '67 (Spring).