Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

CUDA Launch Failure tied to MATLAB state?

조회 수: 1 (최근 30일)
Jake
Jake 2012년 10월 25일
First of all I'm running MATLAB R2011A on Mac OSX 10.7.5 with CUDA 5.0. My MacBook Pro has a discrete GeForce 650M card. I'm having a rather strange issue which has been plaguing me for months at this point. Basically I'm getting a CUDA "unspecified launch failure" when trying to copy data into the GPU memory, which is usually repeatable but not always.
I'm running simulations which do numeric integration. To be exceedingly brief I have two structures which are moving in a 3D grid. About halfway through the simulation (a few minutes of runtime), I will sometimes get a CUDA failure, but sometimes not. I can't figure out what the conditions are under which it fails. However, once it has failed, if I run the simulation again it will fail every time I try to copy something into the GPU memory. If I quit out of MATLAB and relaunch it, then it will run fine up until the same location at which point it may or may not fail again. The code is pretty long, and not particularly well-written (it wasn't written by me), so I'm not going to post it, but I can if somebody actually wants to go through it.
So, to summarize: something is causing a failure within MATLAB making the GPU card inaccessible, and whatever causes it then locks out the card until restarting the program. This same exact code ran fine on a Windows machine with a different graphics card. I could just go use the Windows machine but I'd much prefer to be able to work on my own computer. Ultimately, the question I have is: what are some things I can try to figure out what exactly is causing this error?
  댓글 수: 2
Jill Reese
Jill Reese 2012년 10월 25일
편집: Jill Reese 2012년 10월 25일
Are you using the GPU functionality in the Parallel Computing Toolbox? If so, are you using overloads or the CUDAKernel? If not, are you invoking a MEX file that contains GPU operations?
Was the Windows machine on which this was working also running R2011a? Did it also have CUDA 5.0 installed?
Jake
Jake 2012년 10월 25일
I'm using a MEX file. And, I sort of answered my own question, finally. Whatever is going wrong has to do with MATLAB's video memory management on OSX. I thought I had tried this before, but I guess I hadn't. If I force all graphics operations to run on the integrated card then my simulations will run to completion. So, the plots that I was creating apparently kept taking up more and more memory on the graphics card to the point where there wasn't enough left for the data I was trying to copy over. It would never free this memory up (even after close all and clear all) until I quit and restarted the program. So, bottom line, I can run my stuff now. Yay!

답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by