The ABC project --HelloWorld_CUDA-- threw an exception
Thanks very much for your works, but I encounter trouble on using vtk-m, I'm sorry to that.
My env
- OS: Windows 7 64, Chinese Simplified
- VTK-m: vtk-m-v1.3.0
- CUDA: CUDA Toolkit 10.0
- CMAKE: CMake 3.11.1
- GLEW: glew 2.1.0
- GLUT: Freeglut 3.0.0
- MSVC: VS2015 Community Edition
My configuration
- compiler : VC14 Win64
- VTKm_ENABLE_CUDA: ON
- VTKm_CUDA_Architecture: all
- VTKm_ENABLE_RENDERING: ON
- VTKm_ENABLE_EXAMPLES: ON
- others : default
My trouble
I've read the README.md, and select the proper components, well, I built the project successfully against CUDA 10.0, but I can't run the demo, I can't run the ABC project even, was I wrong somewhere? How to shoot the exception below:
Here, the error message in the "Output window"
0x0000000076D77A6D (ntdll.dll)处(位于 HelloWorld_CUDA.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000000000000074 时发生访问冲突。
Translated by baidu
Exceptions thrown at 0x0000000076D77A6D (ntdll. dll) (in HelloWorld_CUDA.exe): Access conflicts occur at 0xC0000005: read location 0x0000000000000074.
The debugger stops here, cudaGetDeviceCount(&numDevices) --in the lambda expression-- will trigger exception
void queryNumberOfDevicesandHighestArchSupported(vtkm::Int32& nod, vtkm::Int32& has)
{
std::call_once(deviceQueryFlag, []() {
//first query for the number of devices
auto res = cudaGetDeviceCount(&numDevices);
if (res != cudaSuccess)
{
numDevices = 0;
}
for (vtkm::Int32 i = 0; i < numDevices; i++)
{
cudaDeviceProp prop;
VTKM_CUDA_CALL(cudaGetDeviceProperties(&prop, i));
const vtkm::Int32 arch = (prop.major * 10) + prop.minor;
archVersion = vtkm::Max(arch, archVersion);
}
So, I open the sample project in the CUDA-SDK, add cudaGetDeviceCount, it was all right.
Is it a bug, or I was wrong somewhere?
Thanks again.