Compiling OpenGL/ NVidia CUDA-based applications on Debian Linux

The Debian platform managed by ISG.EE uses the following directory layout for the OpenGL libraries and headers:


OpenGL header files

The OpenGL headers are found under /usr/include/GL.

CUDA header files

For NVidia programming, a CUDA toolkit matching the installed NVidia driver is selected when a toolkit program like nvccis run.
Any CUDA headers have to bee included by manually matching the toolkit version used. Check the content of the SEPP package cuda_toolkit-1x.x-sr for available versions by listing its contents with ls /usr/pack/cuda_toolkit-1x.x-sr

Usually, there is a lower driver/toolkit version combo for desktop PCs and a higher version combo for Slurm GPU nodes:

The following environment variables have to be set with the correct driver or toolkit version:

export CPPFLAGS='-I/usr/pack/cuda_toolkit-1x.x-sr/<driver or toolkit version>/include'`
export LDFLAGS='-L/usr/pack/cuda_toolkit-1x.x-sr/<driver or toolkit version>/lib64 -Wl,-rpath,/usr/pack/cuda_toolkit-1x.x-sr/<driver or toolkit version>/lib64' `

Compiling sources and linking against NVidia libraries


That said we encourage the use of CUDA Toolkit within Conda environments. More details can be found in the Working with GPU or CPU in data sciences and Conda subpages of this wiki.


Programming/Libraries/OpenGL (last edited 2022-07-11 05:55:41 by stroth)