FlashMP: Fast Discrete Transform-Based Solver for Preconditioning Maxwell's Equations on GPUs

Haoyuan Zhang, Yaqian Gao, Xinxin Zhang, Jialin Li, Runfeng Jin, Yidong Chen, Feng Zhang, Wu Yuan, Wenpeng Ma, Shan Liang, Zhang Jian, Zhonghua Lu · DOI

FlashMP: Fast Discrete Transform-Based Solver for Preconditioning Maxwell's Equations on GPUs

Abstract

Efficiently solving large-scale linear systems is a critical challenge in electromagnetic simulations, particularly when using the Crank-Nicolson Finite-Difference Time-Domain (CN-FDTD) method. Existing iterative solvers are commonly employed to handle the resulting sparse systems but suffer from slow convergence due to the ill-conditioned nature of the double-curl operator. Approximate preconditioners, like Successive Over-Relaxation (SOR) and Incomplete LU decomposition (ILU), provide insufficient convergence, while direct solvers are impractical due to excessive memory requirements. To address this, we propose FlashMP, a novel preconditioning system that designs a subdomain exact solver based on discrete transforms. FlashMP provides an efficient GPU implementation that achieves multi-GPU scalability through domain decomposition. Evaluations on AMD MI60 GPU clusters (up to 1000 GPUs) show that FlashMP reduces iteration counts by up to 16x and achieves speedups of 2.5x to 4.9x compared to baseline implementations in state-of-the-art libraries such as Hypre. Weak scalability tests show parallel efficiencies up to 84.1%.

Introduction

Simulating how electromagnetic waves interact with complex objects—like antennas, stealth aircraft, or photonic crystals—requires solving Maxwell’s equations with high precision. Researchers often utilize the Crank-Nicolson Finite-Difference Time-Domain (CN-FDTD) method for its stability and energy-conservative properties. However, this method produces massive, "ill-conditioned" linear systems dominated by a double-curl operator. In numerical linear algebra, such ill-conditioning causes standard iterative solvers (e.g., BiCGSTAB or GMRES) to struggle, often requiring thousands of iterations to converge.

Existing preconditioning techniques either fail to leverage the massive parallelism of modern GPU clusters or impose prohibitive memory requirements. FlashMP addresses this gap by introducing a subdomain exact solver based on discrete transforms, designed specifically for high-performance GPU environments.

Methodology: The FlashMP Architecture

FlashMP accelerates simulations by decoupling the complex 3D field variables into independent, smaller systems. Its architecture is built upon three pillars:

  1. Discrete Transform via SVD: The core innovation involves applying Singular Value Decomposition (SVD) to finite-difference operators. This mathematical approach diagonalizes the system, transforming a massive coupled problem into many independent $3 \times 3$ matrix systems that can be solved in parallel.
  2. GPU-Centric Implementation: The discrete transforms are mapped to General Matrix Multiply (GEMM) operations. Since GPUs are optimized for GEMM, FlashMP achieves near-peak hardware performance. An efficient "Pack/Unpack" communication mechanism handles data exchange between GPUs via MPI.
  3. Subdomain Solving Workflow: The solver follows a structured four-step process: component-wise transform, point-wise field solving, inverse transform, and boundary adjustment.
Overview of the FlashMP four-step preconditioning workflow, from initial transform to boundary adjustment.

Low-Rank Boundary Correction

While discrete transforms perfectly diagonalize infinite grids, real-world simulations involve finite subdomains. These boundaries introduce errors in the transform. FlashMP utilizes the Woodbury matrix identity to apply a "low-rank" correction.

Illustration of subdomain boundary points and the corresponding low-rank decomposition used for error correction.

A key insight is that boundary errors scale with the surface area of the subdomain ($O(n^2)$) rather than its volume ($O(n^3)$). By projecting these errors into a low-dimensional boundary subspace, FlashMP can correct the solution without the computational cost of re-solving the entire volumetric system.

Key Results and Performance

FlashMP was evaluated using synthetic 3D grids on clusters of up to 1,000 AMD MI60 GPUs. The results demonstrate significant improvements over industry-standard baselines like Hypre:

  • Iteration Reduction: FlashMP reduced the number of iterations required for convergence from 193 (without preconditioning) to just 12–20 iterations.
  • Speedup: Compared to the highly optimized Hypre library (using ILU and Jacobi), FlashMP achieved speedups ranging from 2.5x to 4.9x.
  • Scalability: The system maintained a parallel efficiency of 84.1% when scaling to 1,000 GPUs. By converting a global communication-heavy problem into a local computation-heavy one, FlashMP minimizes the synchronization bottlenecks typical of large clusters.
  • Memory Efficiency: FlashMP’s theoretical space complexity is $O(n^4)$, a substantial improvement over traditional direct solvers that require $O(n^6)$ memory.

Conclusion and Future Work

FlashMP provides a practical and highly scalable preconditioning strategy for electromagnetic simulations. While currently optimized for uniform Cartesian grids and Dirichlet boundary conditions, future work will explore adapting the discrete transform approach to non-uniform meshes and incorporating more complex absorbing boundary conditions, such as Perfectly Matched Layers (PML).

Summary updated

BibTeX
@misc{zhang2025flashmp,
  author = {Haoyuan Zhang and Yaqian Gao and Xinxin Zhang and Jialin Li and Runfeng Jin and Yidong Chen and Feng Zhang and Wu Yuan and Wenpeng Ma and Shan Liang and Zhang Jian and Zhonghua Lu},
  title = {{FlashMP: Fast Discrete Transform-Based Solver for Preconditioning Maxwell's Equations on GPUs}},
  year = {2025},
  eprint = {2508.07193},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.07193},
}
Figure