неверный аргумент конфигурации на thrust :: sort_by_key - PullRequest
0 голосов
/ 05 мая 2018

У меня проблема при попытке использовать sort_by_key:

Я получаю следующую ошибку в терминале:

прекращение вызова после выброса экземпляра 'thrust :: system :: system_error' что (): после куба _ :: DeviceRadixSort :: SortPairs (1): неверный аргумент конфигурации

Код CUDA: (реальный = число с плавающей запятой / двойной)

//Declare and populate device vectors
//---------------------------------------------
thrust::device_vector<real> d_cellXPositions(h_cellXPositions);
real * d_cellXPositions_ptr = thrust::raw_pointer_cast(&d_cellXPositions[0]);

thrust::device_vector<real> d_cellYPositions(h_cellYPositions);
real * d_cellYPositions_ptr = thrust::raw_pointer_cast(&d_cellYPositions[0]);

thrust::device_vector<uint> d_results(_w * _h);
uint * d_results_ptr = thrust::raw_pointer_cast(&d_results[0]);
//---------------------------------------------

//Declare hash and cell occ containers
//---------------------------------------------
thrust::device_vector<uint> d_cellOcc(GRID_RES*GRID_RES, 0);
uint * d_cellOcc_ptr = thrust::raw_pointer_cast(&d_cellOcc[0]);

thrust::device_vector<uint> d_hash(_cellCount, 0);
uint * d_hash_ptr = thrust::raw_pointer_cast(&d_hash[0]);
//---------------------------------------------


//Launch kernels
//---------------------------------------------
uint blockCount = std::ceil(_w*_h)/1024;
uint threadCount = (_w*_h)/blockCount + 1;

printf("Cell count = %d; Hash Size = %d; xPosCount = %d; yPosCount = %d\n",_cellCount, d_hash.size(), d_cellXPositions.size(), d_cellYPositions.size());

std::cout << "Starting kernels \n";

g_pointHash<<<blockCount, threadCount>>>(d_hash_ptr, d_cellXPositions_ptr, d_cellYPositions_ptr, GRID_RES, _w, _h);
cudaThreadSynchronize();
checkCUDAErr();

g_countCellOcc<<<blockCount, threadCount>>>(d_hash_ptr, d_cellOcc_ptr, _w*_h);
cudaThreadSynchronize();
thrust::copy(d_hash.begin(), d_hash.end(), std::ostream_iterator<uint>(std::cout, " "));
std::cout << "~ \n";

//Exclusive scan the cell occ to get the starting indicies

auto tuple = thrust::make_tuple(d_cellXPositions.begin(), d_cellYPositions.begin());
auto zipit = thrust::make_zip_iterator(tuple);
thrust::sort_by_key(d_hash.begin(), d_hash.end(), zipit);
cudaThreadSynchronize();

Вывод CUDA-memcheck:

========= CUDA-MEMCHECK
CUDA INFO -------------------
Runtime Version: 7050
Driver Version: 8000
GPU INFO---------------------
Device name: GeForce GTX 1080
Memory Clock Rate (KHz): 5005000
Memory Bus Width (bits): 256
Peak Memory Bandwidth (GB/s): 320.320000
-----------------------------
Left Button Pressed
Cell count = 20; Hash Size = 20; xPosCount = 20; yPosCount = 20
Starting kernels 
========= Program hit cudaErrorInvalidConfiguration (error 9) due to "invalid configuration argument" on CUDA API call to cudaLaunch. 
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame:/usr/lib64/nvidia/libcuda.so.1 [0x2ef343]
=========     Host Frame:/lib64/libcudart.so.7.5 (cudaLaunch + 0x17e) [0x2ed1e]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 [0xace82]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_Z40__device_stub__Z11g_pointHashPjPKdS1_jjjPjPKdS1_jjj + 0x10b) [0xac5b6]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_Z11g_pointHashPjPKdS1_jjj + 0x43) [0xac5fb]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN10CUDASolver14makeDiagram_NNEjjj + 0x48f) [0x83b9b]
=========     Host Frame:application [0x94c2]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN11QMetaObject8activateEP7QObjectiiPPv + 0x659) [0x29bf89]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN15QAbstractButton7clickedEb + 0x32) [0x306c92]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x306e94]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x308a2e]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent + 0xcc) [0x308b7c]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN7QWidget5eventEP6QEvent + 0x1f8) [0x191a48]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 0x9c) [0x1534bc]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN12QApplication6notifyEP7QObjectP6QEvent + 0xc03) [0x15b2c3]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 0x108) [0x271e78]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb + 0x1df) [0x159f2f]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x1aaec6]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x1ad81b]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 0x9c) [0x1534bc]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN12QApplication6notifyEP7QObjectP6QEvent + 0x227) [0x15a8e7]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 0x108) [0x271e78]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 0x370) [0x12cf90]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QGuiApplicationPrivate24processWindowSystemEventEPN29QWindowSystemInterfacePrivate17WindowSystemEventE + 0x105) [0x12ed85]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 0xbb) [0x10ad7b]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5 [0xb0fa0]
=========     Host Frame:/lib64/libglib-2.0.so.0 (g_main_context_dispatch + 0x15a) [0x49d7a]
=========     Host Frame:/lib64/libglib-2.0.so.0 [0x4a0b8]
=========     Host Frame:/lib64/libglib-2.0.so.0 (g_main_context_iteration + 0x2c) [0x4a16c]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 0x5f) [0x2c393f]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 0xea) [0x2705ea]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication4execEv + 0x84) [0x278a44]
=========     Host Frame:application [0x734d]
=========     Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x21b35]
=========     Host Frame:application [0x75a7]
=========
========= Program hit cudaErrorInvalidConfiguration (error 9) due to "invalid configuration argument" on CUDA API call to cudaGetLastError. 
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame:/usr/lib64/nvidia/libcuda.so.1 [0x2ef343]
=========     Host Frame:/lib64/libcudart.so.7.5 (cudaGetLastError + 0x163) [0x30713]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN10CUDASolver12checkCUDAErrEv + 0x11) [0x83591]
Error: invalid configuration argument
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN10CUDASolver14makeDiagram_NNEjjj + 0x49e) [0x83baa]
=========     Host Frame:application [0x94c2]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN11QMetaObject8activateEP7QObjectiiPPv + 0x659) [0x29bf89]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN15QAbstractButton7clickedEb + 0x32) [0x306c92]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x306e94]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x308a2e]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent + 0xcc) [0x308b7c]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN7QWidget5eventEP6QEvent + 0x1f8) [0x191a48]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 0x9c) [0x1534bc]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN12QApplication6notifyEP7QObjectP6QEvent + 0xc03) [0x15b2c3]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 0x108) [0x271e78]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb + 0x1df) [0x159f2f]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x1aaec6]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x1ad81b]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 0x9c) [0x1534bc]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN12QApplication6notifyEP7QObjectP6QEvent + 0x227) [0x15a8e7]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 0x108) [0x271e78]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 0x370) [0x12cf90]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QGuiApplicationPrivate24processWindowSystemEventEPN29QWindowSystemInterfacePrivate17WindowSystemEventE + 0x105) [0x12ed85]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 0xbb) [0x10ad7b]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5 [0xb0fa0]
=========     Host Frame:/lib64/libglib-2.0.so.0 (g_main_context_dispatch + 0x15a) [0x49d7a]
=========     Host Frame:/lib64/libglib-2.0.so.0 [0x4a0b8]
=========     Host Frame:/lib64/libglib-2.0.so.0 (g_main_context_iteration + 0x2c) [0x4a16c]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 0x5f) [0x2c393f]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 0xea) [0x2705ea]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication4execEv + 0x84) [0x278a44]
=========     Host Frame:application [0x734d]
=========     Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x21b35]
=========     Host Frame:application [0x75a7]
=========
========= Program hit cudaErrorInvalidConfiguration (error 9) due to "invalid configuration argument" on CUDA API call to cudaLaunch. 
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame:/usr/lib64/nvidia/libcuda.so.1 [0x2ef343]
=========     Host Frame:/lib64/libcudart.so.7.5 (cudaLaunch + 0x17e) [0x2ed1e]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 [0xace82]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_Z37__device_stub__Z14g_countCellOccPjS_jPjS_j + 0x93) [0xac690]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_Z14g_countCellOccPjS_j + 0x29) [0xac6bb]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN10CUDASolver14makeDiagram_NNEjjj + 0x531) [0x83c3d]
=========     Host Frame:application [0x94c2]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN11QMetaObject8activateEP7QObjectiiPPv + 0x659) [0x29bf89]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN15QAbstractButton7clickedEb + 0x32) [0x306c92]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x306e94]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x308a2e]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent + 0xcc) [0x308b7c]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN7QWidget5eventEP6QEvent + 0x1f8) [0x191a48]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 0x9c) [0x1534bc]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN12QApplication6notifyEP7QObjectP6QEvent + 0xc03) [0x15b2c3]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 0x108) [0x271e78]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb + 0x1df) [0x159f2f]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x1aaec6]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x1ad81b]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 0x9c) [0x1534bc]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN12QApplication6notifyEP7QObjectP6QEvent + 0x227) [0x15a8e7]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 0x108) [0x271e78]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 0x370) [0x12cf90]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QGuiApplicationPrivate24processWindowSystemEventEPN29QWindowSystemInterfacePrivate17WindowSystemEventE + 0x105) [0x12ed85]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 0xbb) [0x10ad7b]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5 [0xb0fa0]
=========     Host Frame:/lib64/libglib-2.0.so.0 (g_main_context_dispatch + 0x15a) [0x49d7a]
=========     Host Frame:/lib64/libglib-2.0.so.0 [0x4a0b8]
=========     Host Frame:/lib64/libglib-2.0.so.0 (g_main_context_iteration + 0x2c) [0x4a16c]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 0x5f) [0x2c393f]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 0xea) [0x2705ea]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication4execEv + 0x84) [0x278a44]
=========     Host Frame:application [0x734d]
=========     Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x21b35]
=========     Host Frame:application [0x75a7]
=========
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ~ 
========= Program hit cudaErrorInvalidConfiguration (error 9) due to "invalid configuration argument" on CUDA API call to cudaPeekAtLastError. 
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame:/usr/lib64/nvidia/libcuda.so.1 [0x2ef343]
=========     Host Frame:/lib64/libcudart.so.7.5 (cudaPeekAtLastError + 0x163) [0x305a3]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system4cuda6detail4cub_15DeviceRadixSort9SortPairsIjNS_5tupleIddNS_9null_typeES7_S7_S7_S7_S7_S7_S7_EEEE9cudaErrorPvRmRNS3_12DoubleBufferIT_EERNSC_IT0_EEiiiP11CUstream_stb + 0x8312) [0x9d4e5]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZZN6thrust6system4cuda6detail6detail24stable_radix_sort_detail22cub_sort_pairs_wrapperIjNS_5tupleIddNS_9null_typeES7_S7_S7_S7_S7_S7_S7_EEEE9cudaErrorPvRmRNS2_4cub_12DoubleBufferIT_EERNSD_IT0_EEiNS_4lessISE_EEiiP11CUstream_stbEN10workaround9host_pathESA_SB_RNSD_IjEERNSD_IS8_EEiNSK_IjEEiiSN_b + 0x5d) [0x940f5]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system4cuda6detail6detail24stable_radix_sort_detail22cub_sort_pairs_wrapperIjNS_5tupleIddNS_9null_typeES7_S7_S7_S7_S7_S7_S7_EEEE9cudaErrorPvRmRNS2_4cub_12DoubleBufferIT_EERNSD_IT0_EEiNS_4lessISE_EEiiP11CUstream_stb + 0x62) [0x94159]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system4cuda6detail6detail24stable_radix_sort_detail26stable_radix_sort_by_key_nINS2_3tagEjNS_5tupleIddNS_9null_typeES8_S8_S8_S8_S8_S8_S8_EENS_4lessIjEEEEvRNS2_16execution_policyIT_EEPT0_mPT1_T2_ + 0x297) [0x933f6]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system4cuda6detail6detail24stable_radix_sort_by_keyINS2_3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS7_INS_7pointerINS_5tupleIddNS_9null_typeESD_SD_SD_SD_SD_SD_SD_EES5_NS_11use_defaultESF_EEEEEEvRNS2_16execution_policyIT_EET0_SM_T1_NS_4lessINS_14iterator_valueISM_E4typeEEE + 0xb0) [0x92743]
terminate called after throwing an instance of '=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system4cuda6detail6detail28stable_primitive_sort_detail28stable_primitive_sort_by_keyINS2_3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS8_INS_7pointerINS_5tupleIddNS_9null_typeESE_SE_SE_SE_SE_SE_SE_EES6_NS_11use_defaultESG_EEEENS_4lessIjEEEENS4_20disable_if_bool_sortIT0_E4typeERNS2_16execution_policyIT_EESM_SM_T1_T2_ + 0x34) [0x91d3d]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system4cuda6detail6detail28stable_primitive_sort_by_keyINS2_3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS7_INS_7pointerINS_5tupleIddNS_9null_typeESD_SD_SD_SD_SD_SD_SD_EES5_NS_11use_defaultESF_EEEEEEvRNS2_16execution_policyIT_EET0_SM_T1_NS_4lessINS_14iterator_valueISM_E4typeEEE + 0x34) [0x91260]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system4cuda6detail18stable_sort_detail18stable_sort_by_keyINS2_3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS7_INS8_IdEEEESE_NS_9null_typeESF_SF_SF_SF_SF_SF_SF_EEEENS_4lessIjEEEENS3_24enable_if_primitive_sortIT0_T2_E4typeERNS2_16execution_policyIT_EESL_SL_T1_SM_ + 0xcb) [0x90885]
thrust::system::system_error=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZZN6thrust6system4cuda6detail18stable_sort_by_keyINS2_3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS6_INS7_IdEEEESD_NS_9null_typeESE_SE_SE_SE_SE_SE_SE_EEEENS_4lessIjEEEEvRNS2_16execution_policyIT_EET0_SN_T1_T2_EN10workaround13parallel_pathERNSJ_IS4_EES9_S9_SG_SI_ + 0x48) [0x8fe38]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system4cuda6detail18stable_sort_by_keyINS2_3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS6_INS7_IdEEEESD_NS_9null_typeESE_SE_SE_SE_SE_SE_SE_EEEENS_4lessIjEEEEvRNS2_16execution_policyIT_EET0_SN_T1_T2_ + 0x48) [0x8fe82]
'
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust18stable_sort_by_keyINS_6system4cuda6detail3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS6_INS7_IdEEEESD_NS_9null_typeESE_SE_SE_SE_SE_SE_SE_EEEENS_4lessIjEEEEvRKNS5_21execution_policy_baseIT_EET0_SO_T1_T2_ + 0x58) [0x8f28b]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system6detail7generic11sort_by_keyINS0_4cuda6detail3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS8_INS9_IdEEEESF_NS_9null_typeESG_SG_SG_SG_SG_SG_SG_EEEENS_4lessIjEEEEvRNS_16execution_policyIT_EET0_SP_T1_T2_ + 0x48) [0x8e3ab]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust11sort_by_keyINS_6system4cuda6detail3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS6_INS7_IdEEEESD_NS_9null_typeESE_SE_SE_SE_SE_SE_SE_EEEENS_4lessIjEEEEvRKNS5_21execution_policy_baseIT_EET0_SO_T1_T2_ + 0x58) [0x8d590]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust6system6detail7generic11sort_by_keyINS0_4cuda6detail3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS8_INS9_IdEEEESF_NS_9null_typeESG_SG_SG_SG_SG_SG_SG_EEEEEEvRNS_16execution_policyIT_EET0_SN_T1_ + 0x48) [0x8c79a]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust11sort_by_keyINS_6system4cuda6detail3tagENS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS6_INS7_IdEEEESD_NS_9null_typeESE_SE_SE_SE_SE_SE_SE_EEEEEEvRKNS5_21execution_policy_baseIT_EET0_SM_T1_ + 0x54) [0x8b669]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN6thrust11sort_by_keyINS_6detail15normal_iteratorINS_10device_ptrIjEEEENS_12zip_iteratorINS_5tupleINS2_INS3_IdEEEES9_NS_9null_typeESA_SA_SA_SA_SA_SA_SA_EEEEEEvT_SD_T0_ + 0x46) [0x8a139]
=========     Host Frame:/home/i7469704/parallelvoronoi/Common/../lib/libsolver_gpu.so.1 (_ZN10CUDASolver14makeDiagram_NNEjjj + 0x661) [0x83d6d]
=========     Host Frame:application [0x94c2]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN11QMetaObject8activateEP7QObjectiiPPv + 0x659) [0x29bf89]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN15QAbstractButton7clickedEb + 0x32) [0x306c92]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x306e94]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x308a2e]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent + 0xcc) [0x308b7c]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN7QWidget5eventEP6QEvent + 0x1f8) [0x191a48]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 0x9c) [0x1534bc]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN12QApplication6notifyEP7QObjectP6QEvent + 0xc03) [0x15b2c3]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 0x108) [0x271e78]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb + 0x1df) [0x159f2f]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x1aaec6]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 [0x1ad81b]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 0x9c) [0x1534bc]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5 (_ZN12QApplication6notifyEP7QObjectP6QEvent + 0x227) [0x15a8e7]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 0x108) [0x271e78]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 0x370) [0x12cf90]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QGuiApplicationPrivate24processWindowSystemEventEPN29QWindowSystemInterfacePrivate17WindowSystemEventE + 0x105) [0x12ed85]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5 (_ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 0xbb) [0x10ad7b]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5 [0xb0fa0]
=========     Host Frame:/lib64/libglib-2.0.so.0 (g_main_context_dispatch + 0x15a) [0x49d7a]
=========     Host Frame:/lib64/libglib-2.0.so.0 [0x4a0b8]
=========     Host Frame:/lib64/libglib-2.0.so.0 (g_main_context_iteration + 0x2c) [0x4a16c]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 0x5f) [0x2c393f]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 0xea) [0x2705ea]
=========     Host Frame:/opt/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 (_ZN16QCoreApplication4execEv + 0x84) [0x278a44]
=========     Host Frame:application [0x734d]
=========     Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x21b35]
=========     Host Frame:application [0x75a7]
=========
  what():  after cub_::DeviceRadixSort::SortPairs(1): invalid configuration argument
========= Error: process didn't terminate successfully
========= Internal error (20)
========= No CUDA-MEMCHECK results found

бит информационной перегрузки, но дайте мне знать, если вам нужно больше.

1 Ответ

0 голосов
/ 05 мая 2018
  1. Подобные вопросы должны включать MCVE, как указано в пункте 1 здесь .

  2. Сомнительно для меня, что любая используемая проверка ошибок CUDA имеет большое значение, так как ошибка здесь (как подтверждено OP в комментариях) имеет отношение к коду CUDA, а не Thrust. Что бы ни делала эта линия:

    checkCUDAErr();
    

    кажется недостаточным для предотвращения возникающей здесь путаницы.

  3. Основная проблема здесь (как указано в комментариях к OP), по-видимому, заключается в том, что этот расчет размера сетки / потока ошибочен:

    uint blockCount = std::ceil(_w*_h)/1024;
    uint threadCount = (_w*_h)/blockCount + 1;
    

    Я полагаю, что любое произведение _w*_h, кратное целому числу 1024, даст неправильный размер для threadCount. Конкретным примером будет _w*_h - 1024. Тогда blockCount будет 1. Когда blockCount равно 1, тогда переменная threadCount будет иметь значение 1025, что является недопустимым размером блока для CUDA. Возможное решение здесь может быть просто установить threadCount на 1024 с жестким кодом. Это, очевидно, размер блока, который используется в расчете blockCount, и хотя код ядра не показан, в нем, похоже, имеется правильная проверка потока, так как текущие вычисления blockCount и threadCount включают "округление".

  4. Как правило, Thrust имеет хорошую проверку ошибок, и предыдущая ошибка в коде, не связанном с Thrust, может отображаться при вызове алгоритма Thrust, поскольку он также будет указывать на любые предыдущие ошибки (которые не были устранены). , Однако ошибка здесь (в 3 выше) не имеет ничего общего с Thrust.

  5. Я бы рекомендовал любому, кто использует графический процессор Pascal, обновить хотя бы CUDA 8 (здесь, похоже, используется CUDA 7.5). Я бы посоветовал всем, кто использует графический процессор Volta, обновить хотя бы до CUDA 9.

...