Hi Louis!
We use Qt Creator on Linux, so you can try the steps below.
Your environment and hardware may be some different, but I think it’s not very important.
Anyway, our CUDA platform is the following:
1) X64 desktop with ASUS motherboard, Intel processor, 16 Gb memory, 1 Tb HDD
2) Tesla K20c CUDA card
3) All video is processed by embedded Intel graphic card
4) CUDA card is used only for accelerating of the numeric computations. More over the card hasn’t any video output (some X11 setting is needed to setup).
5) The Linux version is Ubuntu 18.04 which was installed on clean HDD from desktop variant of the Ubuntu 18.04 iso distribution.
6) CUDA version (nvcc –version)
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Wed_Apr_11_23:16:29_CDT_2018
Cuda compilation tools, release 9.2, V9.2.88
7) Nvidia driver version (output of the nvidia-smi command)
+---------------------------------------------------------------------------
--+
| NVIDIA-SMI 396.26 Driver Version: 396.26 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K20c Off | 00000000:01:00.0 Off | 0 |
| 32% 43C P0 54W / 225W | 0MiB / 4743MiB | 100% Default |
+-------------------------------+----------------------+----------------------+
As I mentioned, we use Qt Creator on Linux, and we used the following steps to set the CUDA environment:
1) In the main qt creator window view click the button "Projects"
2) Build settings windows is opened. You need just add three env vars for CUDA:
CUDA_HOME=/usr/local/cuda
CUDA_INC_PATH=/usr/local/cuda/include
CUDA_LIB_PATH=/usr/local/cuda/lib64
3) Another solution is to set these vars as global, for example in ~/.bashrc (before build):
export CUDA_HOME=/usr/local/cuda
export CUDA_INC_PATH=/usr/local/cuda/include
export CUDA_LIB_PATH=/usr/local/cuda/lib64
Both solution works for me
Please don't forget to add cuda to PATH and LD_LIBRARY_PATH global vars too.
Thanks,
--Igor.