Visual studio 2008 Unable to open cpp1.ii file while compiling CUDA project

Visual studio 2008 Unable to open cpp1.ii file while compiling CUDA project,visual-studio-2008,cuda,Visual Studio 2008,Cuda,I've been using CUDA for the past couple of months on a 64-bit Windows 7 installation along with Visual Studio 2008. Recently I shifted to a 32-bit Windows 7 installation and also updated my graphics card, which earlier was a 8600GTX and now is a GTX465. I've installed the relevant driver and the CUDA 3.1 toolkit, and am still using VS2008. Somehow if I try and compile the same Visual Studio projects I'd used earlier, I get the following output in the build window: 1>------ Build started: P

I've been using CUDA for the past couple of months on a 64-bit Windows 7 installation along with Visual Studio 2008. Recently I shifted to a 32-bit Windows 7 installation and also updated my graphics card, which earlier was a 8600GTX and now is a GTX465. I've installed the relevant driver and the CUDA 3.1 toolkit, and am still using VS2008.

Somehow if I try and compile the same Visual Studio projects I'd used earlier, I get the following output in the build window:

1>------ Build started: Project: CUDAServicenew, Configuration: Debug Win32 ------
1>Performing Custom Build Step
1>CUDAHelloWorld.cu
1>Catastrophic error: cannot open source file      "C:/Windows/TEMP/tmpxft_0000082c_00000000-6_CUDAHelloWorld.cpp1.ii": not a regular file
1>1 catastrophic error detected in the compilation of "C:/Windows/TEMP/tmpxft_0000082c_00000000-6_CUDAHelloWorld.cpp1.ii".
1>Compilation terminated.
1>Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
1>Build log was saved at "file://c:\wamp\www\server_root\GPU_stitcher_live\SiftGPU\CUDAServicenew\CUDAServicenew\Debug\BuildLog.htm"
1>CUDAServicenew - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've used a custom build rule as shown below:

“$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -c -D_DEBUG -DWIN32 -D_CONSOLE   D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Od,/Zi,/RTC1,/MTd --ptxas-options -v - I”$(CUDA_INC_PATH)” -I./ -o $(ConfigurationName)\CUDAHelloWorld.obj CUDAHelloWorld.cu

This happens even when I try to compile the SDK samples provided by NVIDIA. I can't understand why the

cpp1.ii
file is not being opened. What is it that I'm doing wrong here? Any help would be greatly appreciated.


#1

Just to check a few random (i.e. unlikely) ideas...

  1. Did you install the 32-bit toolkit?
  2. Are you running VS as administrator?
  3. Is C:\Windows\TEMP writeable?
  4. Do you have disk space?

VS2005 always needed to be run as administrator (even without CUDA) and while 2008 is less strict it is required for some operations, so just checking.


#2

Are you using your own custom build rule? Try using the cuda.rules provided with the SDK, that way you'll always have up-to-date build settings. If you really have to use your own build rule then please post the compiler command line.

#3

I did try using cuda.rules but to no avail. I've also posted the compiler command line.

#4

Yes, the C:\Windows\Temp folder was not writable, ensuring that solved the problem. Thank you so much