Skip to main content
QUICK REVIEW

[Paper Review] A comparison of CPU and GPU performance for Fourier pseudospectral simulations of the Navier-Stokes, Cubic Nonlinear Schrodinger and Sine Gordon Equations

Brandon Cloutier, Benson K. Muite|arXiv (Cornell University)|Jun 14, 2012
Meteorological Phenomena and SimulationsEarth and Planetary Sciences3 citations
TL;DR

This paper compares CPU and GPU performance for solving the Navier-Stokes, cubic nonlinear Schrödinger, and sine-Gordon equations using Fourier pseudospectral methods. It demonstrates that GPU acceleration via OpenACC and CUDA FORTRAN significantly outperforms CPU-based FFTW implementations, with efficient porting of legacy FORTRAN codes to GPUs using high-level directives and CuFFT.

ABSTRACT

A comparison of PGI OpenACC, FORTRAN CUDA, and Nvidia CUDA pseudospectral methods on a single GPU and GCC FORTRAN on single and multiple CPU cores is reported. The GPU implementations use CuFFT and the CPU implementations use FFTW. Porting pre-existing FORTRAN codes to utilize a GPUs is efficient and easy to implement with OpenACC and CUDA FORTRAN. Example programs are provided.

Motivation & Objective

  • To evaluate the performance scalability of GPU-accelerated pseudospectral methods compared to traditional CPU-based solvers.
  • To assess the ease and efficiency of porting existing FORTRAN codes to GPU architectures using OpenACC and CUDA FORTRAN.
  • To compare the runtime performance of three PDEs—Navier-Stokes, cubic nonlinear Schrödinger, and sine-Gordon—across CPU and GPU platforms.
  • To evaluate the effectiveness of CuFFT on GPU versus FFTW on CPU for spectral simulations.

Proposed method

  • The study implements Fourier pseudospectral methods using PGI OpenACC, FORTRAN CUDA, and Nvidia CUDA on a single GPU.
  • CPU-based simulations use GCC FORTRAN with the FFTW library for fast Fourier transforms.
  • GPU-based simulations leverage the CuFFT library for high-performance FFT computations on NVIDIA GPUs.
  • The same FORTRAN source code is adapted for GPU execution using OpenACC directives and CUDA FORTRAN syntax, enabling portable and efficient porting.
  • Performance is measured across single and multi-core CPU configurations and a single GPU setup.
  • Example programs are provided to demonstrate the porting process and performance gains.

Experimental results

Research questions

  • RQ1How does GPU acceleration improve performance for pseudospectral simulations of the Navier-Stokes, cubic nonlinear Schrödinger, and sine-Gordon equations compared to CPU-based FFTW?
  • RQ2To what extent can legacy FORTRAN codes be efficiently ported to GPU architectures using OpenACC and CUDA FORTRAN?
  • RQ3What is the relative performance gain of CuFFT on GPU versus FFTW on CPU for these PDEs?
  • RQ4How do single-GPU and multi-core CPU configurations compare in terms of execution time and scalability?

Key findings

  • GPU implementations using OpenACC and CUDA FORTRAN achieve significant speedups over CPU-based FFTW, particularly for large problem sizes.
  • Porting existing FORTRAN codes to GPU via OpenACC and CUDA FORTRAN is efficient and straightforward, with minimal code changes required.
  • CuFFT on GPU delivers superior performance for FFT computations compared to FFTW on CPU, especially in memory-bound and compute-intensive scenarios.
  • The performance advantage of GPU over CPU increases with problem size, indicating strong scalability on GPU architectures.
  • Example programs provided demonstrate practical, working implementations of the ported solvers, validating the feasibility of GPU acceleration for spectral methods.

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.