gpuArray: CUDA ERROR ALREADY MAPPED

I was trying to use gpuArray, for instance with the following Matlab provided example:
X = rand(10, 'single');
G = gpuArray(X);
classUnderlying(G) % Returns 'single'
G2 = G .* G; % Performed on GPU
whos G2 % Result on GPU
But Matlab gives this error message. I checked online, it means the resources already mapped, which does not tell me much. How should I fix this? Previously I had no problem using gpuArray on my matlab. Thank you!
Error using gpuArray
An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_ALREADY_MAPPED

댓글 수: 6

Walter Roberson
Walter Roberson 2014년 2월 1일
Are you attempting to use gpuArray within parfor or spmd workers?
Did you try exiting MATLAB and restarting it?
Matt J
Matt J 2014년 2월 1일
Do you have multiple graphics cards installed?
Matt J
Matt J 2014년 2월 1일
Have you been using any non-MATLAB GPU applications?
Walter Roberson
Walter Roberson 2014년 2월 1일
Or multiple MATLAB sessions each of which uses the GPU ?
Grace Gu
Grace Gu 2014년 2월 3일
Thank you. I did not try to use gpuArray within parfor or spmd workers. Restarting Matlab did not work. I do have 2 GPUs installed. I have used feval and GPU application too before. I plan to reinstall CUDA tomorrow, and see whether that works.
Grace Gu
Grace Gu 2014년 2월 4일
Just now I reinstalled CUDA and it is fixed!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 GPU Computing에 대해 자세히 알아보기

질문:

2014년 2월 1일

댓글:

2014년 2월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by