Qt5 Parallel Visualization Library

using a visualization library to introduce parallel computing


Andrew Danner
Computer Science Department
Swarthmore College
 

Overview

QtVis provides a library for visualizing and animating a two dimensional grid of colors through a small DataVis class. The primary purpose of this library is to provide an easy to use interface to explore parallel computing through data visualization. The DataVis class makes it easy to create small derived classes that use various parallel frameworks to update the color grid. The library uses Qt and OpenGL 4.x to animate and visualize the grid as the user updates it, but users do not need to be experts in either Qt or OpenGL to use this library. Currently, the following parallel frameworks are supported

Users can also write single threaded applications for comparison or initial testing.

The installer will attempt to autodetect available libraries, so it is possible to use this library if e.g., you only have pthreads and OpenMP available on your system. While the library will attempt to compile support for as many frameworks as possible, users can focus on a single parallel framework when designing their application, and do not need to understand all of the above parallel frameworks to use this library.

This QtVis git repo includes some small sample demos, and you can use this repo to extend and write your own demos. However, this code also supports being installed as a library. Under this configuration, a single user could configure, build, and install the library on a network and multiple users can develop parallel applications that use this library using a much more simplified code base. Examples of demos that use and link against this library are available in a separate qt-demos repo.

Quick Build Instructions

To quickly try out the code samples, try the standard CMake out of source build directions.
mkdir build
cd build
cmake ..
make -j8
./cpuDemo
./openMPDemo
./threadDemo
./cudaDemo
Not all demos may be available if, for example, CUDA or OpenMP are not supported on your system.

Installation Details

More installation details including tips for finding and configuring CUDA, or installing for multiple users on a network can be found on the install page.

Writing your own animations

While it is possible to modify or add to the demos in the QtVis git repo, it may be easier to use the separate qt-demos repo as a starting point for developing your own animations. The demos page has more details on using this repo and how to write a basic animation in the parallel framework of your choice.

Building with modern CMake

In an attempt to make the library easy to configure and install for a wide range of platforms, I tried to learn some modern CMake design patterns along the way. While understanding these details is not required for users of this library, perhaps other CMake users may find my CMake 3.x notes on this project helpful for designing libraries of moderate complexity. If any CMake experts that come across this document/repo and have constructive feedback for further improvements on my CMake setup, I'd appreciate suggestions.

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.