FLASH is a multiphysics multiscale adaptive mesh refinement (AMR) code originally designed for simulation of reactive flows often found in Astrophysics. With its wide user base and flexible applications configuration capability, FLASH has a dual task of maintaining scalability and portability in all its solvers. The scalability of fully explicit solvers in the code is tied very closely to that of the underlying mesh. Others such as the Poisson solver based on a multigrid method have more complex scaling behavior. Multigrid methods suffer from processor starvation and dominating communication costs at coarser grids with increase in the number of processors. In this paper, we propose a combination of uniform grid mesh with AMR mesh, and the merger of two different sets of solvers to overcome the scalability limitation of the Poisson solver in FLASH. The principal challenge in the proposed merger is the efficiency of the communication algorithm to map the mesh back and forth between uniform grid and AMR. We present two different parallel mapping algorithms and also discuss results from performance studies of the two implementations.
OPTIMIZATION OF MULTIGRID BASED ELLIPTIC SOLVER IN THE FLASH CODE
2347(AMR) package in FLASH. In AMR meshes, the limit to scalability comes from refinement, essentially a global process. Additionally, AMR uses space-filling curves such as Morton ordering to achieve a reasonable balance between proximity and load balancing at the cost of a more complex neighborhood distribution for individual blocks. This can have an impact on scaling especially when block-count per processor is low. The scaling behavior also depends on the frequency of refinement events and the underlying interconnect architecture of the target high performance computing (HPC) platform. Machines such as Blue-gene/P, which have a fast global interconnect, show essentially similar weak scaling behavior for the explicit solvers irrespective of the frequency of refinement. On Cray-XT machines, with their known scaling limits for global operations, the solvers scale well when refinement is infrequent, but begin to show scaling limitations at larger processor counts when refinement is frequent [6].In addition to the explicit solvers, FLASH also supports a multigrid Poisson solver, which is the focus of this paper. The multigrid solver in FLASH is used for two main purposes; for computing self-gravity in cosmological simulations [7,8], and for computing pressure in the incompressible Navier-Stokes solvers used in fluid-structure interaction applications described in [9,10]. The multigrid implementation in FLASH was imported from the solver described in [11], which in turn is adapted from [12]. The solver is currently limited to Cartesian coordinates in a rectangular boxlike domain. However, for the two classes of applications described earlier, this is not a limitation. Cosmology simulations, especially in three-dimensions (3D), are typically performed on a rectangular box. In fluid structure interaction problems, because of th...