I seem to be getting some strange cudaErrors occurring during DLL loading in my application.
I stripped away everything from the main method such that there is only a print statement for printing the cudaError and the return statement (ie: there is no actual GPU code being executed, no memory being allocated on the GPU, nothing):
If I break the program at the printf statement (before it has executed), the cuda errors have already occurred (so the call to cudaGetErrorString or cudaGetLastError are not causing this), yet if I let the application continue to run (or just let it run from start to finish without a breakpoint), ‘no error’ is printed to the screen.
In the output, however, I see:
'Test.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'Test.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'Test.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'Test.exe': Loaded 'C:\CUDA\v3.2\bin\cudart32_32_16.dll', Binary was not built with debug information.
'Test.exe': Loaded 'C:\CUDA\v3.2\bin\curand32_32_16.dll', Binary was not built with debug information.
First-chance exception at 0x7701b727 in Test.exe: Microsoft C++ exception: cudaError at memory location 0x004afc78..
First-chance exception at 0x7701b727 in Test.exe: Microsoft C++ exception: cudaError at memory location 0x004afc78..
First-chance exception at 0x7701b727 in Test.exe: Microsoft C++ exception: cudaError at memory location 0x004afc78..
First-chance exception at 0x7701b727 in Test.exe: Microsoft C++ exception: cudaError at memory location 0x004afc78..
'Test.exe': Loaded 'C:\Windows\SysWOW64\nvcuda.dll', Binary was not built with debug information.
'Test.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'Test.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'Test.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
...lots more dlls being loaded...
Does anyone have any ideas as to what could be causing these cudaErrors? I’m using the CUDA Toolkit version 3.2, and I’ve tried compiling for sm_13 and sm_20 (I have a compatible video card for either).
Thanks in advance for any aid provided!
-Edit- I should also mention that if I let my application run normally with the GPU/CUDA code executing and everything, I don’t see any cudaErrors during the runtime of the application beyond those 4 during the loading. The application appears to run correctly. Those errors have me worried though.
Same problem here. The problem seems to be caused by the texture and surface declarations (I got one exception per declaration). Results are the same with both CUDA “Developer Drivers” (260.99, 263.06) and the last one (266.58) on both NVIDIA samples and my application.