Asynchronous Execution of the Fast Multipole Method Using Charm++

Mustafa Abdul Jabbar, Rio Yokota, David E. KeyesarXiv 2014

TL;DR

This paper presents an asynchronous execution model for the Fast Multipole Method (FMM) using Charm++, a parallel programming system. By decoupling communication and computation phases with finer granularity, they achieve significant performance improvements, especially for non-uniform particle distributions, compared to traditional bulk-synchronous FMM implementations.

What Problem Does This Paper Address?

The Fast Multipole Method (FMM) is a crucial algorithm for efficiently simulating systems with many interacting particles, commonly used in fields like molecular dynamics and cosmology. Traditional parallel FMM implementations often rely on a "bulk-synchronous" model. This means that all processors must complete a certain phase (like communicating essential particle data) before any can proceed to the next. This can lead to inefficiencies, especially when particle distributions are uneven, as faster processors wait for slower ones. The authors aim to overcome this by introducing an asynchronous approach that allows for more flexible and fine-grained control over communication and computation, thereby improving scalability and performance.

Methods

The core innovation lies in leveraging Charm++'s asynchronous execution model to break down the FMM's communication phases into smaller, manageable units.

  • Asynchronous LET Communication: Instead of a single, large bulk-synchronous communication step for the "local essential tree" (LET), Charm++ allows this to be broken down into smaller, sender-initiated "entry functions." This means data can be sent and processed as it becomes available, rather than waiting for all data to be ready.
  • Novel Partitioning Scheme: The authors introduce a new partitioning scheme that geometrically separates the local tree from the global tree. This is enabled by their use of a "dual tree traversal" in their FMM implementation (ExaFMM), which doesn't require a global key or cubic cells, simplifying the merging of local essential trees.
  • Optimized Weighting Scheme: For load balancing during partitioning, they propose a new weighting scheme that considers both local and remote interaction list sizes, aiming to balance both workload and communication simultaneously. This is expressed by the equation $w_i = l_i + \alpha \cdot r_i$, where $\alpha$ is an optimized constant.
  • Direct Comparison: Crucially, the paper directly compares their Charm++-based asynchronous FMM against the traditional bulk-synchronous approach using the same FMM code (ExaFMM), ensuring a fair evaluation.

Datasets

The paper evaluates their approach using particle distributions representative of real-world scientific applications:

  • Cube: Particles evenly distributed within a cubic domain (e.g., molecular dynamics).
  • Sphere: Particles on the surface of a sphere (e.g., boundary integral problems).
  • Plummer: A highly non-uniform distribution, typical for cosmological N-body simulations, with high concentration in certain areas.

These distributions were used to test the scalability and load-balancing capabilities of their method.

Key Insights and Ideas

  • Granularity is Key: The traditional bulk-synchronous approach is an "extreme case of communication aggregation." Charm++'s fine-grained control over communication granularity is the primary enabler of performance gains.
  • Asynchronicity for Partitioning: While LET communication can be overlapped with local tree traversal in traditional FMM, the initial partitioning phase is often a bottleneck that isn't overlapped with computation. Charm++'s asynchronous model directly addresses this.
  • Code Simplification through Geometry: Separating the local tree from the global tree, enabled by the dual tree traversal, significantly simplifies the implementation of complex features and the integration with frameworks like Charm++.
  • Workload vs. Communication Balance: Simply balancing workload isn't enough; balancing communication is also critical. Their proposed weighting scheme attempts to optimize both simultaneously.
  • Challenging Benchmark: The authors' FMM code has superior serial performance compared to previous asynchronous N-body codes, making it a more challenging and meaningful benchmark for evaluating the overhead of Charm++.

Key Results

  • Significant Speedup: The asynchronous Charm++ version achieved over a 1000x speedup for a highly non-uniform Plummer distribution with $N=10^8$ particles.
  • Improved Scalability: The paper demonstrates strong scalability for their asynchronous FMM, showing performance improvements across three orders of magnitude in the number of cores.
  • Effective Load Balancing: The new weighting scheme for partitioning showed similar load-balancing performance across different particle distributions (Cube, Sphere, Plummer), even for non-powers-of-two numbers of cores.
  • Bottleneck Identification: For very large core counts (4096), the "Comm partition" phase became a bottleneck, but the asynchronous execution model helped mitigate this.

Limitations and Future Work

  • Overhead of Charm++: While Charm++ provides benefits, the authors acknowledge that its overhead is more challenging to hide when the underlying serial FMM code is already highly optimized.
  • Task Migration Not Used: For this study, task migration capabilities of Charm++ were not utilized, suggesting potential for further exploration.
  • Future Work: The paper implies that further optimization of the weighting scheme and exploration of Charm++ features like task migration could yield additional performance gains. The authors also note that their ExaFMM code is publicly available, encouraging further research and development.

Summary updated

BibTeX
@misc{jabbar2014asynchronous,
  author = {Mustafa Abdul Jabbar and Rio Yokota and David E. Keyes},
  title = {{Asynchronous Execution of the Fast Multipole Method Using Charm++}},
  year = {2014},
  eprint = {1405.7487},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1405.7487},
}
Figure