cudafy.net与NSight,调试器不工作 [英] cudafy.net with NSight, debugger not working

查看:338
本文介绍了cudafy.net与NSight,调试器不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如主题所说,我无法让调试器工作。下面是完成的步骤顺序。



注意:我安装了Cuda 5.0并安装了NSight Visual Studio 3.0。我听说有可能调试现在用一个单一的GPU。我假设5.0是正常的,我不需要5.5发布候选人?



1)根据到nvcc编译器驱动程序,将没有符号,并且调试器不能做你想要的(识别或显示特定



似乎其他人问如何将 -G 开关添加到nvcc在cudafy中的编译阶段,一种方法似乎在这里讨论。


As the topic states, I cant get the debugger working. Below is the sequence of steps ive done.

Note: I have Cuda 5.0 installed and NSight visual studio edition 3.0 installed. Ive heard that it is possible to debug now with a single GPU. I'm assuming 5.0 is OK and I don't need the 5.5 release candidate?

1) Changed code to include the following as per the instructions on the site:

        CudafyModes.Target = eGPUType.Cuda;
        CudafyModes.DeviceId = 0;
        CudafyTranslator.Language = eLanguage.Cuda;
        CudafyModule km = CudafyTranslator.Cudafy(eArchitecture.sm_20);

        //Included this line.
        CudafyTranslator.GenerateDebug = true;

        _gpu = CudafyHost.GetDevice(eGPUType.Cuda);
        _gpu.LoadModule(km);

2) Set a break point just after this.

3) Stopped debugging once break point was hit.

4) Solution Explorer, selected "Show all files" and found the "CUDAFYSOURCETEMP.cu" file.

5) Right clicked and selected "Add to project".

6) Open NSIGHT HUD Launcher 3.0.

7) Set setting as follows:

8) Clicked ok.

9) Double clicked CUDAFYSOURCETEMP.cu and set a break point in the code.

10) Went to the NSight Monitor and click "NSight Monitor Ooption" -> CUDA and the set the following:

11) Went back to VS2010 and selected NSight-> Start Cuda Debugging.

once that's done, I hovered the cursor over variables, once the break point has been hit, but nothing shows up. Only ones which show something are blockDim, blockIdx and threadIdx.

I've also opened the CUDA WarpWatch1 window, typed in a variable yet that's giving the following error "Could not resolve name "num2".

Am i missing a step or something?

EDIT Here is the output from the Output window during compilation.

The thread 'vshost.LoadReference' (0x1f78) has exited with code 0 (0x0). 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\FrazMann\Desktop\Market Adj Entry CUDA - MK2\FrazerMann.Profiler.UserInterface\bin\x64\Debug\FrazerMann.Profiler.UserInterface.exe', Symbols loaded. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\FrazMann\Desktop\Market Adj Entry CUDA - MK2\FrazerMann.Profiler.UserInterface\bin\x64\Debug\Cudafy.NET.dll' 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data.OracleClient\v4.0_4.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll' 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'Anonymously Hosted DynamicMethods Assembly' 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll' 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.SqlXml\v4.0_4.0.0.0__b77a5c561934e089\System.Data.SqlXml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.Composition\v4.0_4.0.0.0__b77a5c561934e089\System.ComponentModel.Composition.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Framework\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Caching\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Caching.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll' 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices.Protocols\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.Protocols.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. FrazerMann.Profiler.UserInterface.TaskManager x threadIdx x blockIdx x blockDim Length Length x threadIdx x blockIdx x blockDim Length x threadIdx x blockIdx x blockDim GetLength x threadIdx x blockIdx x blockDim QuickSortOfValues1 x threadIdx x blockIdx x blockDim QuickSortOfValues1 QuickSortOfValues1 FrazerMann.Profiler.UserInterface.TaskManager/o__SiteContainer0 Compiler version: v5.0 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\nvcc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -m64 -arch=sm_20 "C:\Users\FrazMann\Desktop\Market Adj Entry CUDA - MK2\FrazerMann.Profiler.UserInterface\bin\x64\Debug\CUDAFYSOURCETEMP.cu" -o "C:\Users\FrazMann\Desktop\Market Adj Entry CUDA - MK2\FrazerMann.Profiler.UserInterface\bin\x64\Debug\CUDAFYSOURCETEMP.ptx" --ptx CUDAFYSOURCETEMP.cu tmpxft_000010d0_00000000-5_CUDAFYSOURCETEMP.cudafe1.gpu tmpxft_000010d0_00000000-10_CUDAFYSOURCETEMP.cudafe2.gpu

'FrazerMann.Profiler.UserInterface.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Dynamic\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Dynamic.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

解决方案

Unless you specify the -G switch to the nvcc compiler driver, there will be no symbols, and the debugger can't do what you want (identify or show specific variable values) without symbols.

It seems like others have asked how to add the -G switch to the nvcc compilation phase within cudafy, and one approach seems to be discussed here.

这篇关于cudafy.net与NSight,调试器不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆