问题:
在控制台上的Windows上运行cuda-memcheck正在报告
关于CUDA API调用cudaLaunch的程序命中错误2。
问题是“错误2”是什么意思?我认为这是cudaError枚举中包含的错误代码,但我不确定。
平台: Windows 7(64位)
编译器(Visual Studio 2010)
计算能力:1.1(Quadro FX 3800M)
CUDA版本(5.0)
问题:如何找出错误编号的含义?
Cuda-Memcheck结果
Running 1 test case...
========= CUDA-MEMCHECK
========= Program hit error 2 on CUDA API call to cudaLaunch
========= Saved host backtrace up to driver entry point at error
========= Host Frame:C:\Windows\system32\nvcuda.dll
(cuD3D11CtxCreate + 0x11f702) [0x144812]
========= Host Frame:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\cudart64_50_35.dll
(cudaLaunch + 0x2a5) [0x235c5]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(__device_stub__ZN17signal_processing6kernel24cfar_move_valid_elementsEPjPK6float2PS2_fS1_S1_ + 0xab) [0x313cb]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(signal_processing::kernel::cfar_move_valid_elements + 0x1d) [0x313ed]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(signal_processing::algorithm::constant_false_alarm_rate::identify_valid + 0x1af) [0x2a46f]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(signal_processing::algorithm::constant_false_alarm_rate::process + 0x2e3) [0x2bc03]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(server::stream::operator() + 0x5c2) [0x20ce2]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::`anonymous namespace'::thread_start_function + 0x21) [0xe01a1]
========= Host Frame:C:\Windows\system32\MSVCR100.dll
(endthreadex + 0x43) [0x21d9f]
========= Host Frame:C:\Windows\system32\MSVCR100.dll
(endthreadex + 0xdf) [0x21e3b]
========= Host Frame:C:\Windows\system32\kernel32.dll
(BaseThreadInitThunk + 0xd) [0x1652d]
========= Host Frame:C:\Windows\SYSTEM32\ntdll.dll
(RtlUserThreadStart + 0x21) [0x2c521]
=========
========= Program hit error 17 on CUDA API call to cudaFree
========= Saved host backtrace up to driver entry point at error
========= Host Frame:C:\Windows\system32\nvcuda.dll
(cuD3D11CtxCreate + 0x11f702) [0x144812]
========= Host Frame:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\cudart64_50_35.dll
(cudaFree + 0x248) [0x24a98]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(signal_processing::algorithm::pulse_compression::~pulse_compression + 0x38) [0x29228]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::detail::sp_counted_impl_pd<signal_processing::algorithm::pulse_compression * __ptr64,boost::detail::sp_ms_deleter<signal_processing::algorithm::pulse_compression> >::dispose + 0x18) [0x18538]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(server::stream::~stream + 0xe7) [0x167e7]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::detail::thread_data<server::stream>::`scalar deleting destructor' + 0x26) [0x14246]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::thread::join + 0x12d) [0xe146d]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::thread_group::join_all + 0x49) [0x13fd9]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(unit_tests::test_stream::test_method + 0x430) [0x14a50]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused,void (__cdecl*)(void)>::invoke + 0xc) [0x6dcc]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::unit_test::ut_detail::callback0_impl_t<int,boost::unit_test::`anonymous namespace'::zero_return_wrapper_t<boost::unit_test::callback0<boost::unit_test::ut_detail::unused> > >::invoke + 0x16) [0xdab16]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::execution_monitor::catch_signals + 0xb1) [0xdb561]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::execution_monitor::execute + 0x37) [0xdb627]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::unit_test::unit_test_monitor_t::execute_and_translate + 0x5e) [0xdaa8e]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::unit_test::framework_impl::visit + 0x122) [0x92cc2]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::unit_test::traverse_test_tree + 0xae) [0x8d82e]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::unit_test::traverse_test_tree + 0xae) [0x8d82e]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::unit_test::framework::run + 0x4a2) [0x93c62]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(boost::unit_test::unit_test_main + 0x7e) [0xe5ffe]
========= Host Frame:C:\Users\Stephen.Torri\Documents\Visual Studio 2010\Projects\signal_processing\Win64\Bin\RelWithDebInfo\test_stream.exe
(__tmainCRTStartup + 0x11a) [0xe2082]
========= Host Frame:C:\Windows\system32\kernel32.dll
(BaseThreadInitThunk + 0xd) [0x1652d]
========= Host Frame:C:\Windows\SYSTEM32\ntdll.dll (RtlUserThreadStart + 0x21) [0x2c521]
=========
========= LEAK SUMMARY: 0 bytes leaked in 0 allocations
========= ERROR SUMMARY: 2 errors
答案 0 :(得分:4)
请参阅CUDA运行时API中的cudaLaunch()。
您可以在该文档中理解错误代码的含义。 link
cudaErrorMemoryAllocation = 2
API调用失败,因为它无法分配足够的内存来执行请求的操作。
另一方面,我建议你显示更多cuda-memcheck的输出,通常它会显示比人工可读信息更多的人类可读信息。