CudaToolkitDir Points wrong in 4.1

VS2010, compiling .cu files. Just installed cuda 4.1 (32 bit ) after using cuda 4.0 for half year.

Error message says:

“C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.1.targets(249,9): error : The CUDA Toolkit v4.1 directory ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1’ does not exist. Please verify the CUDA Toolkit is installed properly or define the CudaToolkitDir property to resolve this error.”

Note that while i do have a 64 bit system, i have to use the 32 bit Cuda (because i am building 32 bit applications), so the correct directory – and where
CUDA_PATH points is: 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.1\ in system env var.

if i look at SET then i have:

CUDA_BIN_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1\bin

CUDA_INC_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1\include
CUDA_LIB_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1\lib\x64
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1
CUDA_PATH_V3_2=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2
CUDA_PATH_V4_0=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0
CUDA_PATH_V4_1=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1\

all the CUDA Paths are wrong too!

  • who sets the Cuda paths ?
  • who sets CudaToolkitDir ? how do i correct this?
    ** I tried making a system env var for CudaToolkitDir pointing it in the right direction but it seems to get ignored

I have no insights into this MSVS configuration issue myself (being more of a Linux person). A colleague suspects that this machine is in an inconsistent configuration state, and suggests the following:

To fix the state the machine is in, try to uninstall both 32 bit and 64 bit 4.1 toolkits from the system, delete CUDA_PATH_V4_1 environment variable if it still exists and reinstall the 32 bit toolkit. To fix this compiling problem quickly without reinstalling, try setting CUDAToolkitDir to “C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.1\” in the Visual Studio projects files directly.

njuffa – thanks for the quick response. It was a good suggestion. the 64 bit was already unistalled but i uninstalled the 32 bit cuda and then rebooted. that seemed to cure the problem!

Yeah I don’t take well to brute force resignation in the face of unacceptable behaviour:
https://stackoverflow.com/questions/33256078/visual-studio-nsight-cuda-toolkit-v7-5-directory-does-not-exist-error/53643110#53643110

Found a workaround to fix this bug which persists across the decades. (It has been ten years since MVS has it).

Credit goes to University of NewCastle Uk.
starting_cuda.pdf (647 KB)