Fire Simulator and Fractals

using a visualization library to introduce CUDA


Tia Newhall, Andrew Danner
Computer Science Department
Swarthmore College
From the Proceedings of EduPar'18 (paper.pdf, poster.pdf)

Overview
We present two assignments that introduce CUDA programming to upper-level undergraduate students. These assignments use an OpenGL 4.x library we developed that allows students to visualize their computation on the GPU. The library allows students to see their CUDA programs execute on the GPU, and more easily debug their first CUDA programs. Students find these visual assignments to be fun and often add interesting extensions to the required parts.

The first assignment is a forest fire simulator program used in a Parallel and Distributed Computing course, the second is a Fractal Generation assignment used in a Computer Graphics course.

The Visualization Library
Our OpenGL library uses ideas from the "CUDA By Example" text, and transparently allocates a display grid on the GPU that allows students to color individual pixels via a CUDA kernel call. CUDA programs that use this flexible library may allocate additional GPU buffers to store non-color data. Students then write one or more CUDA kernels to update their data and the display grid and the library repeatedly calls these functions in an animation loop.

We provide documentation for the Visulization Library as well as source files in a github repo.

The Forest Fire Simulator Assignment
This is an assignment given in our upper-level course covering parallel and distributed computing (CS87: Parallel and Distributed Computing)

An example of a detailed assignment write-up, including examples and starting point files is here:

The Fractal Generation Assignment
This is an assignment given in our Computer Graphics course (CS40: Computer Graphics).

The detailed assignment, including examples and starting point files is here: