Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

CUDA: Configuration File Error

📅 2010-Aug-04 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

I got this error from the CUDA C compiler (nvcc.exe) when compiling a .cu file:

Visual Studio configuration file '(null)' could not be found for installation at 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..'

The error gives very little clue on how to fix it. I checked the Cuda.rules file and the CUDA toolkit files and found no problems.

It turns out that this is one more icky problem when transitioning to 64-bit computers. I was on a 64-bit machine and using a 32-bit Visual C++ compiler. I had installed the 64-bit versions of the CUDA Toolkit and GPU Computing SDK. The above error was caused by this mismatch.

It went away after I installed the 32-bit versions of the CUDA Toolkit and GPU Computing SDK. Do remember to manually change the CUDA_BIN_PATH and CUDA_LIB_PATH to the bin and lib directories of the CUDA Toolkit installation. The 64-bit toolkit installer sets this to the bin64 and lib64 directories, but the uninstaller does not remove them. And when the 32-bit toolkit is installed, the installer does not update the variables if they already exist (with their wrong paths).

You may also need to add the bin directory to the PATH environment variable, replacing the bin64 path that might be there. Executables compiled with CUDA need this to load the CUDA DLLs they need.