Beyond the Quick Build
directions, the QtVis library supports additional configuration options for installing on your system.
The core library uses Qt5, OpenGL 4.1, and C++11 to render the graphics display and user interface. The library has been tested on Ubuntu 16.04, 18.04, and OSX Sierra and High Sierra and library dependencies are typically available through the package manager (e.g, apt, brew, macports). The build system requires a fairly new CMake at version 3.11+ to handle more complex CUDA support. This was installed from source
The following parallel frameworks are optional, and CMake will attempt to auto detect the installed libraries for your system.
In some cases, particularly CUDA, and OpenMP on OSX, some additional steps may be needed to detect these features.
CMake will configure a make install target for you during the initial configuration. By default on linux, the install prefix is /usr/local
, but you can set an alternate prefix. For custom installs, I regularly use GNU stow
for managing the installation/uninstall. You may need root access to perform some of these steps.
[build]$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/stow/qtvis/ ..
[build]$ make -j8
[build]$ make install
[build]$ cd /usr/local/stow/
[stow]$ sudo stow qtvis
As long as CMake finds the required compilers and libraries, you should not need to do much customization of the CMakeLists.txt
file or the build command. In some cases, you may wish to configure the build type, choosing between Release, Debug, RelWithDebInfo, MinSizeRel.
[build]$ cmake -DCMAKE_BUILD_TYPE=Release ../
If you are having compile errors, it is sometimes helpful to specify the verbose flag to make
to see what the full compile commands are.
[build]$ VERBOSE=1 make
If you cannot get to the build stage because there are some configuration issues, check some of the tips below.
If you have CUDA installed, but CMake is not finding it, you may want to try specifying the full path to the CUDA compiler when running cmake
[build]$ cmake -DCMAKE_CUDA_COMPILER=/usr/local/cuda-9.0/bin/nvcc ../
It may also be necessary to install or point cmake to an older version of gcc if CUDA complains your compiler is too new. For example, on Ubuntu 18.04, CUDA 9.0 does not like the default gcc 7.3.0 version, but is OK with gcc 6.4.0, so my full configuration flags for CUDA 9.0 on Ubuntu 18.04 as of August 2018 were
[build]$ cmake -DCMAKE_CUDA_HOST_COMPILER=/usr/bin/gcc-6 \
Also note that CUDA 8+ is deprecating or removing support for CUDA compute architectures 2.0 and 2.1. If you have a very old NVIDIA graphics card, your hardware may not work with the newer versions of CUDA. The QtVis library has been tested on CUDA 7.5, 8.0, 9.0, and 9.2.
The pthreads demo included in this package uses the optional barrier functions that are available by default on linux systems. An separate implementation of the relevant barrier methods
are provided and compiled in the src/osx
folder for OSX. This should be automatically detected by CMake.
Modern compilers on linux seem to pick up OpenMP just fine on Linux. I have not got OpenMP working on OSX yet, but someone indicates it is possible
. I haven't tested this approach yet.