69

我尝试运行NVIDIA 官方网站上提供的示例程序。大多数程序运行顺利,除了少数我收到类似错误消息的地方。我该如何解决?这是我在运行名为“MatrixMul”的程序后收到的错误消息示例。

注意:我已经在我的 Window7x64 操作系统上安装了 x32 和 x64 NVIDIA CUDA Toolkit v5.0。

'matrixMul.exe': Loaded 'C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\bin\win32\Debug\matrixMul.exe', Symbols loaded.
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\cudart32_50_35.dll', Binary was not built with debug information.
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\AppPatch\AcLayers.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\mpr.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\nvinit.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\nvcuda.dll', Binary was not built with debug information.
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'matrixMul.exe': Unloaded 'C:\Windows\SysWOW64\dwmapi.dll'
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\nvapi.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x12fc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x18a0) has exited with code 0 (0x0).
The program '[3104] matrixMul.exe: Native' has exited with code 0 (0x0)
4

6 回答 6

117

PDB 文件是特定于 Visual Studio 的文件,其中包含项目的调试符号。您可以忽略这些消息,除非您希望使用调试器进入这些 dll 的代码(这是值得怀疑的,因为这些是系统 dll)。换句话说,您可以并且应该忽略它们,因为您不会拥有任何这些 dll 的 PDB 文件(至少默认情况下,事实证明您实际上可以在通过Microsoft Symbol Server进行调试时获得它们)。这意味着当您设置断点并单步执行代码时,您将无法单步执行任何这些 dll(无论如何您都不想这样做)。

为了完整起见,这里是 MSDN 的官方 PDB 描述:

程序数据库 (PDB) 文件包含调试和项目状态信息,允许增量链接程序的调试配置。使用 /ZI 或 /Zi 编译 C/C++ 程序时会创建 PDB 文件

另外为了将来参考,如果您想为自己的代码创建 PDB 文件,则必须在启用 /ZI 或 /Zi 选项的情况下构建项目(您可以通过项目属性设置它们 --> C/C++ - -> 常规,然后设置“调试信息格式”字段)。与您的情况无关,但我认为它将来可能有用

于 2013-04-10T23:02:06.883 回答
36

使用 VS 2013。尝试以下工具 -> 选项 -> 调试 -> 输出窗口 -> 模块加载消息 -> 关闭它将禁用加载模块的显示。

于 2015-02-02T23:37:34.523 回答
20

如果该消息困扰您,您需要运行具有管理权限的 Visual Studio 才能在 Visual Studio 上应用此方向。

工具-> 选项-> 调试-> 符号并选中“Microsoft 符号服务器”框,标记加载所有模块,然后单击加载所有符号。

Visual Studio 将为您完成所有其他操作,并且您将在“输出”窗口中的“调试”下看到此消息“Native' has exited with code 0 (0x0)”

于 2014-01-10T10:13:56.713 回答
6
  1. 请检查项目属性 > 配置属性 > 链接器 > 调试选项卡下的设置生成调试信息是否为是。如果不是,请尝试将其更改为是。

  2. 那些特殊的 pdb(用于 ntdll.dll、mscoree.dll、kernel32.dll 等)用于 Windows API,简单的应用程序不需要。但是,如果您无法为自己编译的项目找到 pdb,我建议确保 Project Properties > Configuration Properties > Debugging > Working Directory 使用 Project Properties > Configuration Properties > General > Output Directory 中的值。

  3. 您需要在“以管理员身份运行”模式下运行 Visual c++。右键单击可执行文件并单击“以管理员身份运行”

于 2013-07-15T12:52:33.270 回答
3

我也是 CUDA/Visual Studio 的新手,在几个示例中遇到了同样的问题。如果您运行 DEBUG-> Start Debugging,然后反复跳过 (F10),您将看到输出窗口出现并被填充。正常执行返回正常完成状态 0x0(如您所见)并且输出窗口关闭。

于 2013-12-10T17:13:21.380 回答
0

如果在 Visual Studio 中发生这种情况,请清理您的项目并再次运行它。

构建 --> 清洁解决方案

运行(或 F5)

于 2016-03-23T04:08:23.193 回答