第一次机会异常cudaError_enum在内存位置 [英] First-chance exception cudaError_enum at memory location

查看:937
本文介绍了第一次机会异常cudaError_enum在内存位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Visual Studio 2012运行我的应用程序时收到此错误。
开发规范:

I'm getting this error when running my app from Visual Studio 2012. Development Specs:


  • Cuda 5.0

  • VS C ++ 2012

  • Quadro K4000

看到有其他相关的文章这里此处在这里,但没有一个很好的答案,我的问题。我检查所有的返回码从CUDA API,CuRAND和CuBLAS和所有都返回成功。我在代码中查看了问题产生的原因,当我为GPU创建一个计时器对象时。

I've seen there are other posts related here, here and here but none has a good answer to my problem. I'm checking all the return codes from CUDA API, CuRAND and CuBLAS and all are returning SUCCESS. I looked in the code where was the problem raising and it happens to be when I create a timer object for the GPU.

我使用CUDA附带的计时器SDK

I'm using the timer that comes with 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上)

finally, just after launching the application I saw this messages in the output console (on 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.

应用程序运行正常,结果看起来很好,但我想知道可能导致什么

The application runs just fine and results look fine to me but I would like to know what could be causing this errors/exceptions and how to solve them, or if I should just ignore them.

推荐答案

你所做的观察有:做一个在CUDA库中被正确捕获和处理的异常。在某些情况下,它是CUDA GPU操作的正常部分。正如您所观察到的,您的应用程序不返回API错误并正确运行。如果你不在VS环境中可以报告这一点,你根本不会观察到这一点。

The observation you are making has to do with an exception that is caught and handled properly within the CUDA libraries. It is, in some cases, a normal part of CUDA GPU operation. As you have observed, your application returns no API errors and runs correctly. If you were not within the VS environment that can report this, you would not observe this at all.

这是CUDA 5.0下的正常行为。我相信有一些尝试在CUDA 5.5中消除它。

This is considered normal behavior under CUDA 5.0. I believe there were some attempts to eliminate it in CUDA 5.5. You might wish to try that, although it's not considered an issue either way.

您可能也会对此问题/答案

这篇关于第一次机会异常cudaError_enum在内存位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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