Post-PASI training: Week 4

Syllabus

Class 9 (August 29th):

Lecture 9 – Slides

  • Challenges of GPU implementations in CFD codes
  • The role of sparse matrices in CFD:
    • Importance of implicit schemes
  • Explanation of the 2D implicit heat transfer using Crank Nicolson:
    • Getting from the mesh to the matrix

Lab 7 (August 30th):

Lab 7 – Slides

Lab7 – code

FD_2D_cusp.cu (shared memory version)

FD_2D_cusp_global.cu (global memory version)

(See global memory version first, it’s easier to understand)

  • Implementation of 2D implicit heat transfer
  • Use 2D stencil codes and Cusp

Class 10 (August 31st):

Lecture 10 – Slides

  • N-body simulation with GPU
  • Example of applications:
    • Astrophysics
    • Surface reconstruction with RBF
    • Others (MD)
  • Revisit optimizations:
    • Shared memory use and tiling
    • Loop unrolling and other optimization techniques

Lab 8 (September 1st):

Lab 8 – Slides

lab8_nbody.cu

nbody_gpu.cu (N body tiled version)

nbody_gpu_2.cu (N body with N not a multiple of threads per block)

nbody_optimized.cu (N body with bigger tiles)

  • Implementation of a fast N-body simulation