gpuPOM: a GPU-based Princeton Ocean Model

Shizhen Xu, Xiaomeng Huang, Y. Zhang, Haohuan Fu, L.‐y. Oey, Fanghua Xu, Bing Yang2014

TL;DR

This paper presents gpuPOM, a full GPU-accelerated version of the Princeton Ocean Model (POM). By rewriting the entire model in CUDA-C and employing novel optimization techniques for memory access, inter-GPU communication, and I/O, they achieve performance comparable to a massive CPU cluster while significantly reducing energy consumption.

What Problem Does This Paper Address?

High-resolution ocean and climate modeling demands immense computational resources, pushing the limits of traditional CPU-based supercomputers. While GPUs offer a compelling alternative due to their parallel processing power, existing efforts often involve partial code porting, leading to limited speedups. The challenge is to fully leverage GPU architecture for complex, large-scale scientific models like POM, which involves intricate physics and massive datasets, to achieve substantial performance gains and energy efficiency.

Methods

The authors tackle this by:

  • Full Model Rewrite: Instead of porting specific "hot spots," they rewrote the entire mpiPOM (a parallel Fortran version) into CUDA-C, enabling full GPU utilization.
  • Single GPU Optimizations:
    • Memory Access: Techniques like read-only data cache utilization, local memory blocking, loop fusion, and function fusion were employed to optimize memory access patterns and exploit the GPU's memory hierarchy.
  • ECC-off & GPU Boost: Disabling error-correcting code (ECC) memory and overclocking the GPU core further boosted performance.
  • Multi-GPU Communication: They developed a novel approach to overlap communication and boundary operations with computation, bypassing the CPU for inter-GPU communication using CUDA streams and low-level IPC functions.
  • Hybrid CPU-GPU I/O: To address the I/O bottleneck in a fully accelerated model, they designed an overlapping I/O strategy where dedicated I/O processes run in parallel with computation on the GPU.

Datasets

Not discussed in the paper. The paper focuses on the model itself and its performance on a specific test case.

Key Insights and Ideas

  • Full GPU Porting is Key: Partial porting of climate models to GPUs yields limited gains. A complete rewrite, while more involved, unlocks the full potential of GPU architecture.
  • Memory Hierarchy is Paramount: For memory-intensive applications like ocean models, optimizing memory access patterns (cache utilization, local memory blocking) is crucial for achieving significant speedups.
  • Overlapping is Essential: Effectively overlapping computation with communication and I/O is critical for maximizing GPU utilization and hiding latency, especially in multi-GPU and hybrid CPU-GPU systems.
  • Dedicated I/O Processes: Offloading I/O to separate processes that run concurrently with GPU computation is a viable strategy to mitigate the I/O bottleneck.

Key Results

  • Performance: The gpuPOM on a workstation with 4 GPUs achieved performance comparable to a powerful cluster with 408 CPU cores.
  • Speedup: Achieved over 400x speedup against a single CPU core.
  • Energy Efficiency: Reduced energy consumption by 6.8 times compared to the CPU cluster.
  • Single GPU Optimizations: Achieved speedups of up to 100x for memory access optimization and 35.3% for local memory blocking.
  • Multi-GPU Performance: Demonstrated strong scaling efficiency of 99% on 2 GPUs and 92% on 4 GPUs.
  • I/O Performance: The I/O overlapping method significantly outperformed default PnetCDF and NO-I/O methods.

Limitations and Future Work

  • Manual Optimization: While the authors implemented several optimizations, analyzing and optimizing complex models like mpiPOM manually is challenging.
  • Future Work: The authors suggest designing an automated tool to further analyze and optimize the dependency structure of such large-scale models. They also mention that the current work provides cost-effective and efficient ways for ocean modeling, implying this approach can be extended to other similar models.

Summary updated

Abstract

Rapid advances in the performance of the graphics processing unit (GPU) have made the GPU a compelling solution for a series of scientific applications. However, most existing GPU acceleration works for climate models are doing partial code porting for certain hot spots, and can only achieve limited speedup for the entire model. In this work, we take the mpiPOM (a parallel version of the Princeton Ocean Model) as our starting point, design and implement a GPU-based Princeton Ocean Model. By carefully considering the architectural features of the state-of-the-art GPU devices, we rewrite the full mpiPOM model from the original Fortran version into a new Compute Unified Device Architecture C (CUDA-C) version. We take several accelerating methods to further improve the performance of gpuPOM, including optimizing memory access in a single GPU, overlapping communication and boundary operations among multiple GPUs, and overlapping input/output (I/O) between the hybrid Central Processing Unit (CPU) and the GPU. Our experimental results indicate that the performance of the gpuPOM on a workstation containing 4 GPUs is comparable to a powerful cluster with 408 CPU cores and it reduces the energy consumption by 6.8 times.
BibTeX
@misc{xu2014gpupom,
  author = {Shizhen Xu and Xiaomeng Huang and Y. Zhang and Haohuan Fu and L.‐Y. Oey and Fanghua Xu and Bing Yang},
  title = {{gpuPOM: a GPU-based Princeton Ocean Model}},
  year = {2014},
  doi = {10.5194/gmdd-7-7651-2014},
}

Loading related content...

Figure