Unable to allocate memory exception in 4.12 when plenty of memory available

I am having issues getting Daz 4.12 to render a large scene. I've spent the last few hours looking for a solution, but nothing has worked so far.

My GPU is an RTX 2070 SUPER

I've tried using the latest nvidia studio driver (441.28) and the latest nvidia game ready driver (441.41), neither makes a difference.

I tried downloading the latest public build (daz 4.12.1.4) and still have the same issue.

The log is pretty clear:

2019-11-28 02:22:27.479 Iray [INFO] - IRAY:RENDER ::   1.10  IRAY   rend info : Initializing OptiX for CUDA device 0
2019-11-28 02:22:31.843 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray [ERROR] - IRAY:RENDER ::   1.10  IRAY   rend error: Unable to allocate 2735929856 bytes from 5219350937 bytes of available device memory
2019-11-28 02:22:31.882 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray [ERROR] - IRAY:RENDER ::   1.2   IRAY   rend error: CUDA device 0 (GeForce RTX 2070 SUPER): Scene setup failed
2019-11-28 02:22:31.886 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray [ERROR] - IRAY:RENDER ::   1.2   IRAY   rend error: CUDA device 0 (GeForce RTX 2070 SUPER): Device failed while rendering
2019-11-28 02:22:50.096 WARNING: ..\..\..\..\..\src\sdksource\cloud\dzcloudtasknotifier.cpp(178): recv failed errno=10054

 

However, since the available memory is ~2.5GB higher than the memory it's attempting to allocate, I don't understand why the error is occuring.

Daz falls back to CPU rendering after the memory exception, but that's not a viable solution to render this scene.


Thank you for your assistance.

Comments

  • You've run out of VRAM. 8Gb isn't infinite.

  • JD_MortalJD_Mortal Posts: 760
    edited November 2019

    First things first... Your actual VRAM and available VRAM are not the same. Windows reserves about 1-3GB of VRAM from every card, depending on the card, just for itself to play with. Daz only has access to that memory when it is "displaying the program GUI", as that is done through windows. However, IRAY talks to the video card at a higher (more direct hardware level). That memory is not accessable for rendering.

    Yet, if the rendering was done "through windows", then windows would surrender most of that memory to the program that needs it... Like, a video game, that uses Direct-X or OpenGL, etc... which goes through the windows WDDM drivers.

    TCC mode will free-up all memory to IRAY, but "all" is not actually "all" still. It is just a lot more, because windows does not see that card in TCC mode, as a "video card" which it has access to use, for "shared virtual video memory". (Windows tries to use all your cards VRAM as one giant chunk, even if you don't have NV-links on your similar cards.)

    Additionally, some scenes can be troublesome. The reported memory and what the card actually uses after it is loaded, are not always correct or adequate to judge "if it will fit". Also, 4.12 has some memory issues, for some computer setups and some cards and some drivers. At this point, it could honestly be anything.

    Try removing some items and see if it renders. If that works, try adjusting your advanced render settings for "texture compression", reducing them to something lower than 512 and 1024. Also, check your models settings for detail. Is you "render level" for sub-D a bit high? They are usually higher for rendering than they are for preview mode, so they polygons will kick-up before they are loaded onto the card, for rendering.

    Alao, do you have anything-else running, which is using your video-card memory, through windows, since windows will not surrender that memory for rendering. (Youtube, videos, songs, multiple browser tabs, other art programs...)

    Post edited by JD_Mortal on
  • Thank you for the detailed response!

    The figures in the scene were all set to SubD level 4. I lowered them to 3 as you suggested and the scene rendered in 15 minutes without falling back to CPU rendering.

    Is there a good way to gauge how much VRAM a scene will need since it appears that the numbers shown in the log are not telling the whole story?

  • The higher the SubD the more memory an item consumes, it's geometry not textures so the memory allocation occurs at a different step in the process. You can see that in the logs of a render. SubD 4 is just a huge increase in VRAM usage. I have an 11Gb card and only use SubD 4 for individual portraits.

  • SixDsSixDs Posts: 2,384

    Further to what Ken has said, what may not be apparent to all DS users is how SubD actually works. Although the SubD levels are expressed as an apparent linear scale (0, 1, 2, 3, etc.), the effect on the number of polygons is not linear, it is exponential. In other words, when you go from SubD 1 to SubD 2 you are not doubling the number of polygons, you are quadrupling them. An object with a SubD level of 0 is set to the base number of polygons at which the object was created, the same object set to SubD 1 has four times the number of polygons that the base has, at SubD 2 the object has sixteen times the number of polygons, and at SubD 3 the object has sixty-four times the number of polygons, and so forth.

Sign In or Register to comment.