All of a sudden my cudafe++.exe would crash doing a debug build (release build would build fine).
CUDACOMPILE : nvcc error : ‘cudafe++’ died with status 0xC0000005 (ACCESS_VIOLATION)
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.0.targets(352,9): error MSB3721: The command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe” -gencode=arch=compute_13,code=“sm_13,compute_13” --use-local-env --cl-version 2010 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin” -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include” --opencc-options -LIST:source=on -G0 --keep --keep-dir “C:\Users\john\Documents\Visual Studio 2008\Projects\resdp1\Debug” -maxrregcount=0 --machine 32 --compile -D_NEXUS_DEBUG -g -Xcompiler “/EHsc /nologo /Od /Zi /RTC1 /MDd " -o “Debug\main.cu.obj” “C:\Users\john\Documents\Visual Studio 2008\Projects\resdp1\main.cu”” exited with code -1073741819.
I did track this problem down. All I needed to crash the compiler was to add a global:
texture< float, cudaTextureType1D, cudaReadModeElementType > d_t32QPenalty;
The crash then seems to occur during link to the debug-version MT runtime library (cudafe++.exe will NOT crash if I change the debug build to use the release-version MT runtime library, which I’m now building with for debug).
I think my build setup is square-on (I’m using (CudaToolkitIncludeDir) and (CudaToolkitLibDir)), but anyone with any ideas? clean rebuild never helped, nor did pch removal.
Perhaps related, I can’t seem to get “texture<” to not be redlined and on mouse-hover it says “texture not a template”. Help! I’m slowly running out of intellisense fu!