CPU-GPU ACCELERATION OF THE AIR POLLUTION FORECAST SYSTEM WITH AN EFFICIENT PARALLEL CHEMICAL SOLVER

Fan Feng, Xuebin Chi, Zifa Wang, Jinrong Jiang, Lin Wu, Jie Li, Yuzhu Wang, Guofeng Zhou, Xipeng Li, Simon SeeJournal of Pure and Applied Mathematics Advances and Applications 2019 · DOI

Abstract

Chemistry-Transport Model (CTM) plays an important role in the air pollution prevention and control. Their general applications such as forecast and prevention of heavy pollution demand highly efficient CTM simulations. The gas-phase chemistry module is always the most computationally intensive module of a CTM. The main reason is that solving the stiff chemical ordinary differential equations (ODEs) of the gas-phase chemistry module consumes most of the computation time. Here we use the Nested Air Quality Prediction Modelling System (NAQPMS) as the CTM and CBM-Z mechanism as its gas-phase chemistry module. CBM-Z adopts the popular Livermore Solver for Ordinary Differential Equations (LSODE) to solve the chemical ODEs. However, LSODE does not adapt to the parallel acceleration due to its complicated matrix iteration and complex code. In our previous work, we have designed an efficient chemical solver Modified-Backward-Euler (MBE) to improve the simulation speed and precision. In this paper, we review MBE algorithm, show its intrinsic parallelism and port the CBM-Z module with MBE solver on the CPU-GPU architecture to accelerate the NAQPMS further.

Introduction

Air pollution forecast systems rely on Chemistry-Transport Models (CTMs) to simulate the movement and chemical transformation of pollutants. A major challenge in these models is the "gas-phase chemistry" module, which requires solving systems of stiff Ordinary Differential Equations (ODEs). These equations are computationally expensive because chemical species react at vastly different rates. Traditionally, the Livermore Solver for Ordinary Differential Equations (LSODE) has been the standard. However, LSODE's complexity—characterized by branching logic and iterative processes—makes it poorly suited for the massive parallelism offered by modern Graphics Processing Units (GPUs).

Methods: Transitioning to Parallel-Friendly Solvers

To overcome the limitations of LSODE, researchers replaced it with the Modified-Backward-Euler (MBE) solver within the Nested Air Quality Prediction Modelling System (NAQPMS). Unlike LSODE, MBE is designed with intrinsic parallelism in mind. It avoids complex iterations and maintains a regular computational flow, which is critical for preventing "thread divergence" on GPUs.

Comparison of the Modified-Backward-Euler (MBE) and Livermore Solver for Ordinary Differential Equations (LSODE).

As shown in the comparison above, MBE offers significant advantages for high-performance computing, including non-negativity preservation and suitability for GPU acceleration. The implementation follows a hybrid CPU-GPU architecture where the CPU handles general model logic and data I/O, while the GPU executes the intensive chemical calculations.

Flowchart of the hybrid CPU-GPU architecture for the NAQPMS air pollution forecast system.

The system was ported to NVIDIA GPUs (K40, K80, and P100) using a "one thread per spatial point" approach. To optimize performance, the team utilized a constant 5-second time step and removed conditional logic that previously skipped reactions for low-concentration species, ensuring a uniform workload across GPU cores.

Results and Performance

The system was evaluated using a 24-hour simulation over a 45km resolution grid covering China. The results demonstrated a dramatic improvement in efficiency:

  • Module Speedup: The CBM-Z chemistry module achieved a 116.2x speedup on an NVIDIA P100 GPU compared to a single-core CPU implementation.
  • System-Wide Impact: The integration of the GPU-accelerated module led to an overall system speedup of 3.5x to 4.3x.
  • Scientific Accuracy: Comparison of concentration maps for $SO_2$ and $NO_2$ confirmed that the transition to the MBE solver and GPU hardware did not compromise the accuracy of the forecast.

Conclusion

The research highlights that for modern hardware, algorithmic simplicity often trumps mathematical sophistication. By replacing a complex, high-order solver with a streamlined, parallel-friendly alternative, the researchers unlocked the full potential of GPU acceleration for air quality modeling. Future work will focus on porting other model components, such as advection and diffusion, to the GPU to further reduce total simulation time.

Summary updated

Abstract

Chemistry-Transport Model (CTM) plays an important role in the air pollution prevention and control. Their general applications such as forecast and prevention of heavy pollution demand highly efficient CTM simulations. The gas-phase chemistry module is always the most computationally intensive module of a CTM. The main reason is that solving the stiff chemical ordinary differential equations (ODEs) of the gas-phase chemistry module consumes most of the computation time. Here we use the Nested Air Quality Prediction Modelling System (NAQPMS) as the CTM and CBM-Z mechanism as its gasphase chemistry module. CBM-Z adopts the popular Livermore Solver for Ordinary Differential Equations (LSODE) to solve the chemical ODEs. However, LSODE does not adapt to the parallel acceleration due to its complicated matrix iteration and complex code. In our previous work, we have designed an efficient chemical solver Modified-Backward-Euler (MBE) to improve the simulation speed and precision. In this paper, we review MBE algorithm, show its intrinsic parallelism and port the CBM-Z module with MBE solver on the CPU-GPU architecture to accelerate the NAQPMS further.
BibTeX
@article{feng2019cpu,
  author = {Fan Feng and Xuebin Chi and Zifa Wang and Jinrong Jiang and Lin Wu and Jie Li and Yuzhu Wang and Guofeng Zhou and Xipeng Li and Simon See},
  title = {{CPU-GPU ACCELERATION OF THE AIR POLLUTION FORECAST SYSTEM WITH AN EFFICIENT PARALLEL CHEMICAL SOLVER}},
  journal = {Journal of Pure and Applied Mathematics Advances and Applications},
  year = {2019},
  doi = {10.18642/jpamaa\_7100122086},
}
Figure