I am creating a 400x400 sparse complex double matrix, and then trying to convert it to a gpuArray. However, the conversion results in the following error upon the first attempt after a restart of Matlab:
Error using gpuArray
An unexpected error occurred on the device. The error code was: CUSPARSE_INTERNAL_ERROR.
Once this error was thrown, if I try again to convert the matrix a second time (without a restart of Matlab), then error is now:
Error using gpuDevice (line 26)
An unexpected error occurred during CUDA execution. The CUDA error was:
all CUDA-capable devices are busy or unavailable
If I restart Matlab, the first error returns, and the cycle repeats. Does anyone know how this can be fixed?
The graphics card is the Nvidia Quadro P4000, with the latest driver (220.127.116.1109 from here), and I am running Matlab R2017a on Windows 10 64-bit. The ouput from running gpuDevice directly after a Matlab restart is as follows:
CUDADevice with properties:
Name: 'Quadro P4000'
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
I have also tried increasing the TdrDelay registry key to 8 seconds in the Windows registry, as described here, and the problem persists.