Parallelization of a Smoothed Particle Hydrodynamic Code for Simulation of Shocks in Accretion Disks
We present the parallelization of a Serial Code that was designed to model shocks around black hole in accretion disks using the Smoothed Particles Hydrodynamics (SPH). The goal we obtained with our parallelization is threefold: (1) Execution speed gain nearly proportional to the number of processors; (2) Processing a number of SPH particles so high that doesn't fit into a single computer; (3) Implementation of the parallel code in such a way to make future additions of new physic ingredients easier. The paradigm we use to realize the parallelization is the Multiple Instruction Multiple Data (MIMD) one. The three dimensional computational domain is decomposed into concentrically cylindrical sub domains. All the SPH particles, whose vector radius projection (in X,Y plane) lays between two consecutive cylinders, are assigned to the same process. A modified serial version of the code run on every sub domain. The interaction between particles in a sub domain with that owned by the two adjacent one is obtained defining "edge particles". All parameters of the "edge particles" are exchanged between two consecutive couple of process by, Message Passing Interface (MPI) standard. The sub-domain radius Rk are not fixed in order to ensure load balancing among processors. At each time step all internal SPH particles are processed and advanced after the density, pressure and gravitational forces are calculated considering the presence of the "edge particles". At the end of each time step particles migrating to the two consecutive sub domains are exchanged and the host particles are refreshed. The parallel code we have realized has run in a cluster of bi processors workstations linked by a fast local Internet link and on the CINECA (Bologna) IBM PC Cluster.
Memorie della Societa Astronomica Italiana Supplementi
- Pub Date:
- Numerical computation;