Multi-GPU Heat Equation

GPU Teaching Kit – Accelerated Computing

Objective

Implement a Multi-GPU version of an explicit finite difference recurrence relation for the Heat equation in two dimensions.

Prerequisites

Before starting this lab, make sure that:

Instructions

Edit the code in the code tab to perform the following:

Instructions about where to place each part of the code is demarcated by the //@@ comment lines.

Local Setup Instructions

The most recent version of source code for this lab along with the build-scripts can be found on the Bitbucket repository. A description on how to use the CMake tool in along with how to build the labs for local development found in the README document in the root of the repository.

The executable generated as a result of compiling the lab can be run using the following command:

./HeatEquation\_Template -i <dev num>,<grid dim X>,<grid dim Y>,<num steps>

where <dev num> is the number of devices to use, <grid dim X>,<grid dim Y> the dimensions of the grid and <num steps> the number of time steps to perform.

To verify the correctness of your solution for the lab use:

# Generate the expected solution:
./HeatEquation\_Solution -i 1,<grid dim X>,<grid dim Y>,<num steps> -o heat_solution.raw
# Compare and verify your solution: 
./HeatEquation\_Template -i <dev num>,<grid dim X>,<grid dim Y>,<num steps> \
                         -e heat_solution.raw

In order to the solution to be correct the numerical error should be close to zero.