Hi,
The following code manage to crash on my Windows 10 systems with driver 355.82, after repeated process launches:
int main(int argc, const char* argv[])
{
if (argc != 2)
{
cout << "Usage: CudaDeviceInfo <pci_location>" << endl;
return -1;
}
int numDev = 0;
int dev = 0;
cudaError_t errCode = cudaDeviceGetByPCIBusId(&dev, argv[1]);
if (errCode == cudaSuccess)
{
cudaDeviceProp prop;
errCode = cudaGetDeviceProperties(&prop, dev);
if (errCode == cudaSuccess)
{
cout << "CUDA device id " << dev << endl;
cout << "prop.name " << prop.name << endl;
cout << "prop.pciBusID " << prop.pciBusID << endl;
cout << "prop.pciDeviceID " << prop.pciDeviceID << endl;
cout << "prop.pciDomainID " << prop.pciDomainID << endl;
cout << "prop.integrated " << prop.integrated << endl;
cout << "prop.isMultiGpuBoard " << prop.isMultiGpuBoard << endl;
float pitch = prop.memPitch / (1024 * 1024 * 1024.0);
cout << "prop.memPitch " << pitch << "GB" << endl;
float gmem = prop.totalGlobalMem / (1024 * 1024 * 1024.0);
cout << "prop.totalGlobalMem " << gmem << "GB" << endl;
cout << endl;
}
}
errCode = cudaDeviceReset();
cout << "cudaDeviceReset returns " << cudaGetErrorString(errCode) << endl;
return 0;
}
When the process crashes, the execution path from VS2013 remote debugger tracing stops at the call to cudaDeviceGetByPCIBusId. The top of the stack dump showed nvcuda.dll. Crash dump file analysis using both VS2013 debugger and WinDbg reported an access violation from nvcuda.dll.
I cannot find crash references to cudaDeviceGetByPCIBusId from google search. Has anyone experienced this? Did I use cudaDeviceGetByPCIBusId wrongly? I have tried calling the function this way:
cudaError_t errCode = cudaDeviceGetByPCIBusId(&dev, "1:0.0");
and the program still crashes after about 15 consecutive launches.
Thanks