OS X - CUDA - "out of memory in cuMemAlloc/cuLaunchKernel"

You have in mind this:
https://developer.blender.org/T43310

Many people having CUDA “out of memory” problems, but I’m not sure if this problem is also more severe in GTX 5xx series. I also do not know if the problem depends on the version of the nVidia drivers, CUDA or Blender version. For example, I know people who are having “out of memory” problems on Ubuntu Linux 15.04 even with Blender 2.69/2.72, but they had no problem in Ubuntu 12.04.

This arouses my paranoia, I hope this is not something done on purpose so you have to buy new cards with more vRAM.

PS: Just in case, you do the tests renaming the user Blender configuration folder.
https://www.blender.org/manual/getting_started/installing_blender/directorylayout.html

Then configuring again from User Preferences > System > CUDA

And you remember monitor memory usage from nvidia monitor (or GPU-Z like app), not from Blender. You monitor before starting the render (vRAM usage by the system and Blender opened), and monitor while you start rendering.

I don’t know what is the root cause of these issues but I know one thing. For 1.5 year my GTX 580 3GB was working fine and was rendering everything without any problems. Then something has changed, drivers, Cycles or both, and now my card is useless. As someone said, it sometimes fails to render even with a single plane.

I’ve found I can manage if sometimes, I restart Blender or sometimes I just reboot the whole mac. It is working for me but I often get the CUDA message first.

I’ll jump in the pile, same issue here with a GTX580 3G card. I’m dual booting, and for a relatively simple scene OSX will fail with ‘out of memory’ in viewport and render view while windows (with same scene and user prefs) will render fine in both. It was working fine in OSX until very recently after a CUDA update. I guess that was it, kinda wish I hadn’t upgraded.

So it started happening to me even aswell. Even when rendering reaaaaally simple scenes (like one object from a scene, about 10MB of memory). Renders a few frames after restart/relogin and then starts throwing this cuMemAlloc error.

The most absurd thing is that it’s happening on an Nvidia Titan Black, 6GB of RAM.

Running Windows 10, GeForce Game Ready Driver 358.50, Blender 2.76

Same here :confused:
I have GTX 980 Ti with 6GB of RAM and still getting this error :confused:

Error: CUDA error: Out of memory in cuLaunchKernel(cuPathTrace, xblocks , yblocks, 1, xthreads, ythreads, 1, 0, 0, args, 0)
Fra:1 Mem:683.58M (0.00M, Peak 830.21M) | Time:00:17.89 | Mem:2766.16M, Peak:2861.82M | Scene, RenderLayer | Cancel | CUDA error: Out of memory in cuLaunchKernel(cuPathTrace, xblocks , yblocks, 1, xthreads, ythreads, 1, 0, 0, args, 0)
Fra:1 Mem:683.57M (0.00M, Peak 830.21M) | Time:00:18.13 | Sce: Scene Ve:0 Fa:0 La:0

It’s actually one of the things that bought me to Blender rather than other software, first the legality of it (i intend on using it in my job) and that I can render quickly on my 4gb 980gtx. Though I tried to do a render for an animation today and there was no way it was having it.

Now I’m fairly new to blender but on my scene I’ve 21,994 Verts, 22,750 faces and 42,772 Tris. (I am trying to reduce this, I’ve another post asking for help on that). Is that a crazy amount to have? My scene is simple.

I’d have thought this would be a high priority bug since so many people have heavy duty Nvidia cards just for using on blender.

Really hope it gets sorted soon :slight_smile:

When i get that i save, restart blender and reload the file and it renders fine again.
It seems to clear up the memory issue.

This has happened to me as well. I had to revisit a Blender scene from summer 2014 and suddenly started getting tons of CUDA memory errors. I reverted back to a CUDA driver version and Blender build from around the same time, and it perhaps slightly improved the situation … but it was still definitely happening.

As others have mentioned, usually a quick reboot of Blender seems to solve the issue. I have also found that it seems to happen less frequently if you don’t have other apps open that might tap into the GPU. I for instance, often have Photoshop open and Blender/CUDA appears to be much more finicky about rendering when thats the case.

I also use iStat to monitor my VRAM usage, and it does indeed seem to balloon unusually more when rendering. I make sure to wait until the VRAM has been cleared before relaunching Blender.

It’s been quite frustrating overall.

PS. I’m still on 10.9.5 for those that might think it only affects newer OSX builds.

Try this: Before rendering, make sure the viewport is set to “solid” instead of “rendered”. Worked for me and was repeatable.

Hello, I just wanted to throw in that I have the same issue on my Windows 10 with my GTX 580 1.5GB. Everything rendered fine until some weeks ago, now I’m stuck too.
It’s the same when I switch to Linux, so there must me a big bug somewhere in Blender or the current video driver…

I’m having the same issue here with windows 10 gtx 680. Just started a couple of weeks ago. It does seem to work when the viewport is set to solid but there is definitely a bug in there somewhere. Not sure if it is nvidia or Blender thought.

Update. It wasn’t resolved with a solid viewport. It just rendered a few frames and gave up.

@Jhemp, bmw
Please try to give a little more information. Blender version? Does it happen with any scene? Are you monitoring vRAM while Blender render (GPU-z)? Can you share some scene where the problem occurs?

So, what have you changed then? Driver, Blender version? Have you installed/enabled some new addon? Do you enable Motion Blur? If so, you disable Motion Blur and try again.

Recently there have been some improvements in vRAM usage in blender:

It started for me since I think for 4 weeks ago as well. With my simple graphics card I can not go higher than 2G or less.
I have the idea that before blender could borrow some of the host’s ( pc’s memory) memory, and have the idea that it has to do with windows 10 rather than with blender.

Then all you try to identify what has changed in those days (it seems something in Windows 10?)

Hi Yafu,
I’m running Blender version 2.77a.

I’ve turned off the following addons and now it’s working fine.

Layer management, Measure IT, Unifold Transition, Manuel Bastioni Lab, Import BVH, Sketchfab exporter, Lighting Dynamic Sky, Mesh: Perfect Shape, Mesh Zloopok, Animation nodes, Object: animation number.

Of all of the above, the most recent addons (and the ones I suspect most) have been Animation nodes and Mesh: Zloopok, Mesh: Perfect Shape. Maybe others have these addons in common?

My current addons I have now are BLAM, Animall, Sniper, Text Counter, Import FBX, import GOB, Import images as planes, Import makehuman, import Mixamo Fuse, Import UV layout, Import OBJ, Import Web3d, Looptools, Node wrangler, Pro-lighting skies demo, Baketool, Cycles, Blenrig, Rigify, Blender ID.

I have in common loaded the manuel bastioni lab. P.s. I turn of blam that caused blender to slow down when adjusting parameters in the tools shelf right after you create mesh.

Hi Yafu,

Yep, that’s a good idea. I think it may be an issue with an addon that is not compatible with widows 10.

Barry

Hi,

since Blender 2.78 came out, all my CUDA memory problems I have had since 2.75 or so are gone, finally :D:D:D.
Has anyone else experienced the same?

Jhemp

Yes, some users :slight_smile:

Note that if you have a card with a small amount of VRAM, it is very likely that your problem is not due to a possible bug as some of those posed in this thread where you are posting. Just a VRAM usage optimization in 2.78