Skip to main content
QUICK REVIEW

[Paper Review] Multi GPU Performance of Conjugate Gradient Algorithm with Staggered Fermions

Hyungjin Kim, Weonjong Lee|arXiv (Cornell University)|Oct 22, 2010
Radiation Detection and Scintillator TechnologiesPhysics and Astronomy3 references7 citations
TL;DR

This paper presents a highly optimized CUDA implementation of the Conjugate Gradient (CG) algorithm for staggered fermions on a fine lattice (28³×96), achieving 35 GFLOPS per GPU (47% of peak) on NVIDIA GTX 295 hardware. Despite optimizations, multi-GPU performance drops to 12.3 GFLOPS due to I/O bottlenecks from PCI-E and InfiniBand data transfers, prompting analysis of memory coalescing, register usage, and asynchronous communication strategies to overcome these limitations in large-scale lattice QCD simulations.

ABSTRACT

We report results of the performance test of GPUs obtained using the conjugate gradient (CG) algorithm for staggered fermions on the MILC fine lattice ($28^3 imes 96$). We use GPUs of nVIDIA GTX 295 model for the test. When we turn off the MPI communication and use only a single GPU, the performance is 35 giga flops in double precision, which corresponds to 47% of the peak. When we turn on the MPI communication and use multi-GPUs, the performance is reduced down to 12.3 giga flops. The data transfer through the infiniband network and PCI-E bus I/O is a main bottle neck. We suggest two potential solutions of how to optimize the data transfer.

Motivation & Objective

  • To accelerate the Conjugate Gradient (CG) algorithm for lattice QCD simulations using GPUs, specifically for staggered fermions on a fine MILC lattice.
  • To identify and mitigate performance bottlenecks in multi-GPU CG implementations, particularly I/O and communication overhead from PCI-E and InfiniBand.
  • To optimize GPU kernel performance through memory coalescing, register usage reduction, and branch code minimization.
  • To evaluate the feasibility of overlapping GPU memory transfers with MPI communication to reduce total execution time.
  • To explore future improvements via GPU-direct technology and mixed-precision computing for enhanced scalability.

Proposed method

  • Implemented a CUDA-based CG kernel using CUBLAS for linear algebra operations and custom CUDA kernels for the dominant Dirac matrix-vector multiplication in staggered fermion calculations.
  • Optimized memory access by aligning data structures to enable coalesced memory transactions across GPU thread blocks.
  • Reduced register usage from 77 to 61 per thread block by restructuring data access patterns, increasing occupancy and performance by 7%.
  • Minimized branching and used bit operations and loop unrolling to improve instruction-level parallelism and reduce divergence penalties.
  • Used asynchronous cudaMemcpy and MPI-IO in non-blocking mode to overlap data transfers with computation, aiming to reduce communication latency.
  • Evaluated the impact of GPU-direct technology and dual memory copy engines (Fermi+) as potential solutions to current memory sharing and I/O limitations.

Experimental results

Research questions

  • RQ1What is the achievable single-GPU performance of a CUDA-optimized CG solver for staggered fermions on a 28³×96 lattice?
  • RQ2What are the primary performance bottlenecks in multi-GPU CG implementations for lattice QCD, and how do they scale with node count?
  • RQ3To what extent can asynchronous data transfers between GPU and CPU overlap with MPI communication to reduce total I/O time?
  • RQ4Why does the current system fail to overlap CUDA and MPI memory transfers, and what hardware/software conditions are required to enable it?
  • RQ5How will future technologies like GPU-direct and mixed-precision arithmetic improve multi-GPU CG performance in lattice field theory?

Key findings

  • The single-GPU CG implementation achieved 35 GFLOPS in double precision, representing 47% of the GTX 295's theoretical peak performance.
  • The GPU code was 76 times faster than the corresponding CPU implementation, demonstrating the effectiveness of GPU acceleration for lattice QCD.
  • In multi-GPU mode using 4 nodes, total execution time was ~14.5 ms, with data transfer operations accounting for ~70% of the total time.
  • GPU computation time was only 32% of the total time in the 4-node setup, confirming that I/O and communication dominate performance overhead.
  • Asynchronous memory transfers and MPI communication could, in principle, reduce communication time by up to one-third, but hardware limitations prevented effective overlap on the current system.
  • Future improvements via GPU-direct and Fermi-era GPUs with dual memory copy engines are expected to resolve current memory sharing and I/O bottlenecks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.