Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jan 6;2(2):226-235.
doi: 10.1021/acsestair.4c00181. eCollection 2025 Feb 14.

GPU Implementation of a Gas-Phase Chemistry Solver in the CMAQ Chemical Transport Model

Affiliations

GPU Implementation of a Gas-Phase Chemistry Solver in the CMAQ Chemical Transport Model

Duncan Quevedo et al. ACS EST Air. .

Abstract

The Community Multiscale Air Quality (CMAQ) model simulates atmospheric phenomena, including advection, diffusion, gas-phase chemistry, aerosol physics and chemistry, and cloud processes. Gas-phase chemistry is often a major computational bottleneck due to its representation as large systems of coupled nonlinear stiff differential equations. We leverage the parallel computational performance of graphics processing unit (GPU) hardware to accelerate the numerical integration of these systems in CMAQ's CHEM module. Our implementation, dubbed CMAQ-CUDA, in reference to its use in the Compute Unified Device Architecture (CUDA) general purpose GPU (GPGPU) computing solution, migrates CMAQ's Rosenbrock solver from Fortran to CUDA Fortran. CMAQ-CUDA accelerates the Rosenbrock solver such that simulations using the chemical mechanisms RACM2, CB6R5, and SAPRC07 require only 51%, 50%, or 35% as much time, respectively, as CMAQv5.4 to complete a chemistry time step. Our results demonstrate that CMAQ is amenable to GPU acceleration and highlight a novel Rosenbrock solver implementation for reducing the computational burden imposed by the CHEM module.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing financial interest.

Figures

Figure 1
Figure 1
Schematic of CMAQ science process time stepping structure. SCIPROC is the Fortran routine that calls the science process routines. VDIFF is vertical diffusion. HADV is horizontal advection. ZADV is vertical advection. HDIFF is horizontal diffusion. CLDPROC denotes cloud processes. CHEM is gas-phase chemistry. AERO denotes aerosol processes. Times tn and tn+1 are the nth and subsequent synchronization time steps, respectively.
Figure 2
Figure 2
Pie chart of module timing burdens per time step for an 8-core simulation using the ROS3 solver and CB6R5 chemical mechanism with aero7 SOA treatment and standard cloud chemistry for the CMAQ 2018 12NE3 benchmark scenario.
Figure 3
Figure 3
Example schematic of domain subdivision and mapping to MPI processes. Each MPI processes is given its own CPU core and shares GPUs as instructed within our CMAQ-CUDA runtime configuration.
Figure 4
Figure 4
Schematic of CMAQ ROS3 code structure. Arrows represent data transfer. All routines are on the CPU.
Figure 5
Figure 5
Schematic of CMAQ-CUDA ROS3 code structure. Arrows represent data transfer.
Figure 6
Figure 6
Boxplots of CHEM module timing per synchronization time step for CMAQv5.4 and CMAQ-CUDA across three mechanisms.
Figure 7
Figure 7
Bar plots of total simulation walltime for CMAQv5.4 and CMAQ-CUDA across three mechanisms.
Figure 8
Figure 8
CMAQ science process module timing per synchronization time step as block size varies for CB6R5.
Figure 9
Figure 9
Maps of MB averaged in time for three key species in CB6R5. The left column is the MB between full simulations, the right column is the MB between simulations run with only the CHEM module active.
Figure 10
Figure 10
NME against median concentration for all species and all layers in the CB6R5 CHEM-only simulation. Each species appears 35 times, once for each vertical layer. NME is averaged in space (per layer) and time. Our 1% threshold is marked.
Figure 11
Figure 11
NME for the surface layer across the benchmark and three mechanisms. Each member of the distributions is a different species’ NME averaged in space and time. Highest errors are annotated with the corresponding species and its NME value. Our 1% threshold is marked.
Figure 12
Figure 12
NME for binned vertical layers across three mechanisms. Each member of the distributions is a different species’ NME averaged in space and time for the corresponding layer, such that each box plot has 5 members for each species: one for each layer in the corresponding bin. Our 1% threshold is marked.

References

    1. Seinfeld J. H.; Pandis S. N.. Atmospheric Chemistry and Physics: From Air Pollution to Climate Change, 3rd ed.; John Wiley & Sons: Hoboken, NJ, 2016.
    1. Jacobson M. Z.Fundamentals of Atmospheric Modeling, 2nd ed.; Cambridge Univ. Press: Cambridge, 2005.
    1. Byun D.; Schere K. L. Review of the Governing Equations, Computational Algorithms, and Other Components of the Models-3 Community Multiscale Air Quality (CMAQ) Modeling System. Applied Mechanics Reviews 2006, 59 (2), 51–77. 10.1115/1.2128636. - DOI
    1. Carter W. P. L. Development of the SAPRC-07 Chemical Mechanism. Atmos. Environ. 2010, 44 (40), 5324–5335. 10.1016/j.atmosenv.2010.01.026. - DOI
    1. Carter W.Documentation of the SAPRC-22 Mechanism; University of California, Riverside College of Engineering Center for Environmental Research and Technology, 2023. https://intra.engr.ucr.edu/~carter/SAPRC/22/S22doc.pdfhttps://intra.engr...(accessed 2024–05–10).