I just installed 6.5, the latest nvidia driver for my GTX 970, and VS2013 Community Edition. I had python 2.7.8 already installed. I am new to CUDA and VS2013 development but not python. I can mostly build and run some of the CUDA VS2013 sample solutions so things work up to that point. I say mostly only because some solutions, bandwidthTest for example, builds fine as x86 but nvcc errors when I change it to x64. Since other solutions build and run as x64, I haven’t spent time to investigate.
Now I’m trying to verify my pyCUDA install by running a small test python program. After troubleshooting to get the needed nvcc flags for pyCUDA, the following nvcc command gets built and executed by my test program:
nvcc -cubin -keep -ccbin B:\VisualStudioCom2013\VC\bin\amd64 -cudart shared -arch sm_52 -m64 -IB:\anaconda2\lib\site-packages\pycuda-2014.1-py2.7-win-amd64.egg\pycuda\cuda kernel.cu
Python spawns the above command in a subprocess and nvcc starts to do its thing. Then this error pops up:
CompileError: nvcc compilation of e:\temp\cb4\tmpdx3stw\kernel.cu failed
and this error is returned from the subprocess to my program via stderr:
'B:\VisualStudioCom2013\VC\bin\amd64"\cl.exe @kernel.cpp1.ii.res > "kernel.cpp1.ii' is not recognized as an internal or external command, operable program or batch file.
Note the extraneous double quotes. They look like they’ve been inserted in the same way a Windows path that has spaces in it has to be quoted. Regardless, they are causing the error. Without them I can manually run B:\VisualStudioCom2013\VC\bin\amd64\cl.exe @kernel.cpp1.ii.res > kernel.cpp1.ii and it completes just fine i.e. a valid kernel.cpp1.ii is generated without error. I’ve gone as far as I can go in the python code, verifying that the above nvcc command is correctly getting passed to CreateProcess(). As a newbie CUDA developer, I hate to jump to the “it’s an nvcc bug” conclusion. Any ideas?