Skip to main content
QUICK REVIEW

[Paper Review] Efficient Parallelization for AMR MHD Multiphysics Calculations; Implementation in AstroBEAR

Jonathan Carroll-Nellenback, Brandon Shroyer|arXiv (Cornell University)|Oct 7, 2011
Advanced Data Storage TechnologiesComputer Science3 references5 citations
TL;DR

This paper presents a novel parallelization strategy for adaptive mesh refinement (AMR) magnetohydrodynamics (MHD) simulations in AstroBEAR 2.0, using inter-level threading and a distributed AMR tree to enable global load balancing and efficient memory management. The approach achieves strong weak scaling up to 2048 processors with over 80% efficiency, overcoming limitations in traditional level-by-level load balancing and enabling deep simulations with high refinement levels.

ABSTRACT

Current AMR simulations require algorithms that are highly parallelized and manage memory efficiently. As compute engines grow larger, AMR simulations will require algorithms that achieve new levels of efficient parallelization and memory management. We have attempted to employ new techniques to achieve both of these goals. Patch or grid based AMR often employs ghost cells to decouple the hyperbolic advances of each grid on a given refinement level. This decoupling allows each grid to be advanced independently. In AstroBEAR we utilize this independence by threading the grid advances on each level with preference going to the finer level grids. This allows for global load balancing instead of level by level load balancing and allows for greater parallelization across both physical space and AMR level. Threading of level advances can also improve performance by interleaving communication with computation, especially in deep simulations with many levels of refinement. To improve memory management we have employed a distributed tree algorithm that requires processors to only store and communicate local sections of the AMR tree structure with neighboring processors.

Motivation & Objective

  • To address the scalability limitations of traditional AMR codes that perform level-by-level load balancing, which restricts deep simulations with many refinement levels.
  • To improve memory efficiency in large-scale AMR simulations by distributing the AMR tree structure across processors, minimizing global memory access.
  • To enable greater parallelism by allowing independent threading of grid advances across different refinement levels, improving processor utilization during communication delays.
  • To develop a dynamic load balancing strategy that accounts for the progress of coarser levels when distributing work on finer levels, ensuring balanced workloads across processors.
  • To demonstrate strong weak scaling performance in AMR-MHD simulations on large processor counts, validating the efficiency of the new algorithmic design.

Proposed method

  • Employing inter-level threading to advance grids on different refinement levels in parallel, with higher priority given to finer levels to ensure progress and reduce idle time.
  • Implementing a distributed AMR tree where each processor stores only local tree nodes and communicates only necessary tree information with neighbors, reducing memory footprint and communication overhead.
  • Using extended ghost zones to decouple grid advances across levels, enabling independent computation and reducing synchronization bottlenecks.
  • Introducing a dynamic load balancing algorithm that predicts remaining workload across all levels (0 to l) per processor and redistributes finer-level grids to balance total predicted work.
  • Formulating the predicted remaining workload as $\eta_{l}^{p} = \sum_{l'=0}^{l} (s_{l'}g_{l'}^{p} - w_{l'}^{p})$, and adjusting grid distribution via $g_{l}^{p} = \overline{g_{l}} - \frac{\eta_{l-1}^{p} - \overline{\eta_{l-1}}}{s_{l}}$ to equalize $\eta_{l}^{p}$ across processors.
  • Validating the approach with weak scaling tests on up to 2048 processors using a magnetized cylinder advection problem with a 12.5% filling fraction.

Experimental results

Research questions

  • RQ1Can inter-level threading in AMR simulations improve load balancing and reduce idle time during communication waits?
  • RQ2How does a distributed AMR tree structure affect memory usage and communication efficiency in large-scale simulations?
  • RQ3To what extent can dynamic load balancing across multiple refinement levels improve weak scaling performance in AMR-MHD simulations?
  • RQ4What is the weak scaling efficiency of the new AMR algorithm on large processor counts, particularly in deep simulations with high refinement levels?
  • RQ5Can the proposed method enable practical use of deep AMR hierarchies (many levels) without requiring each level to be load-balanced independently?

Key findings

  • The proposed inter-level threading strategy enables global load balancing across all refinement levels, eliminating the need to balance each level independently and allowing efficient use of deep AMR hierarchies.
  • The distributed AMR tree reduces memory overhead by ensuring each processor stores only local tree information and communicates only with immediate neighbors, improving scalability.
  • The dynamic load balancing algorithm successfully maintains balanced workloads across processors by predicting and adjusting for the combined workload of all coarser and current levels.
  • The implementation achieves over 80% weak scaling efficiency up to 2048 processors in both fixed-grid and AMR simulations, with a base grid resolution adjusted to maintain 64³ cells per processor.
  • The method allows for deep simulations with high refinement levels by decoupling level advances and enabling continuous processor utilization during communication waits.
  • The approach supports simulations with low filling fractions (e.g., 12.5%) and many refinement levels, overcoming prior limitations that restricted the number of usable AMR levels.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.