Parallel Spectral Numerical Methods/GPU programs for Fourier pseudospectral simulations of the Navier-Stokes, Cubic Nonlinear Schrodinger and sine Gordon equations

= GPU programs for Fourier pseudospectral simulations of the Navier-Stokes, Cubic Nonlinear Schrödinger and sine Gordon equations =

This section includes the programs taken from a conference paper by Cloutier, Muite and Rigge. The main purpose is to give example programs which show how to use graphics processing units (GPUs) to solve partial differential equations using Fourier methods. For further background on GPUs and programming models for GPUs see Cloutier, Muite and Rigge. It should be noted that the algorithms used for the sine Gordon equation are very similar to those for the Klein Gordon equation discussed elsewhere in this tutorial. For consistency with the rest of the tutorial, only programs using CUDA Fortran and OpenACC extensions to Fortran are included although Cloutier, Muite and Rigge also has CUDA C programs. GPUs enable acceleration of Fourier pseudospectral codes by factors of 10 compared to OpenMP parallelizations on a single 8 core node.

2D Navier Stokes Equations
These programs use the Crank-Nicolson method.

A CUDA Fortran program to solve the 2D Navier-Stokes equations Code download

. An OpenACC Fortran program to solve the 2D Navier-Stokes equations} Code download

2D Cubic Nonlinear Schrödinger Equations
These programs use splitting.

A CUDA Fortran program to solve the 2D Nonlinear Schrödinger equation Code download

An OpenACC Fortran program to solve the 2D Nonlinear Schrödinger equation Code download

2D sine-Gordon Equations
These programs use a semi-explicit method that is similar to that used for the Klein-Gordon equation. Only the main program is included here, and the auxiliary subroutines can be downloaded from Cloutier, Muite and Rigge

A CUDA Fortran program to solve the 2D sine-Gordon equation Code download

An OpenACC Fortran program to solve the 2D sine-Gordon equation Code download