从 Visual Studio 2012 运行我的应用程序时出现此错误。开发规范:
- 库达 5.0
- VS C++ 2012
- Quadro K4000
我已经看到这里、这里和这里还有其他相关的帖子,但没有一个能很好地回答我的问题。我正在检查来自 CUDA API、CuRAND 和 CuBLAS 的所有返回代码,并且都返回成功。我查看了代码中出现问题的地方,恰好是在我为 GPU 创建计时器对象时。
我正在使用 CUDA SDK 附带的计时器
struct GpuTimer{
cudaEvent_t start;
cudaEvent_t stop;
GpuTimer(){
checkCudaErr(
cudaEventCreate(&start)
);
checkCudaErr(
cudaEventCreate(&stop)
);
}
~GpuTimer(){
checkCudaErr(
cudaEventDestroy(start)
);
checkCudaErr(
cudaEventDestroy(stop)
);
}
void Start(){
checkCudaErr(
cudaEventRecord(start, 0)
);
}
void Stop(){
checkCudaErr(
cudaEventRecord(stop, 0)
);
}
float Elapsed(){
float elapsed;
checkCudaErr(
cudaEventSynchronize(stop)
);
checkCudaErr(
cudaEventElapsedTime(&elapsed, start, stop)
);
return elapsed;
}
};
所以在我的主要功能中
int main(args)
{
...
...
...
GpuTimer t;
...
...
}
就在执行该行之后,我得到了
'App.exe' (Win32): Loaded 'C:\Windows\System32\nvcuda.dll'. Module was built without symbols.
'App.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Unloaded 'C:\Windows\System32\dwmapi.dll'
'App.exe' (Win32): Loaded 'C:\Windows\System32\nvapi64.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Cannot find or open the PDB file.
'App.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Cannot find or open the PDB file.
First-chance exception at 0x000007FEFDA29E5D in App.exe: Microsoft C++ exception: cudaError_enum at memory location 0x000000000018EA00. //Repeated 20 times at least
最后,在启动应用程序后,我在输出控制台中看到了这条消息(在 VS2012 上)
'App.exe' (Win32): Loaded 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\cudart64_50_35.dll'. Module was built without symbols.
'App.exe' (Win32): Loaded 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\cublas64_50_35.dll'. Module was built without symbols.
'App.exe' (Win32): Loaded 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\curand64_50_35.dll'. Module was built without symbols.
该应用程序运行得很好,结果对我来说看起来很好,但我想知道是什么导致了这个错误/异常以及如何解决它们,或者我是否应该忽略它们。