I don't know if it's the same bug, but I also experienced an out-of-memory error rendering an animation on my own scene. (Apologies, I did not capture the exact error message)
I tried rendering again, and Blender crashed. It seems the memory became freed at that point. I loaded Blender up and ran a few frames again with Process Explorer open, and noticed this:
- memory usage climbing between frames
A couple seconds before each frame starts rendering, there is a little step up in the VRAM used, and it does not go down after the rendering finishes. The increase in VRAM seems to occur right around the instant this is printed in the console:
Code: Select all
[LuxRays][1016.266] Total BVH memory usage: 1125128Kbytes
[LuxRays][1016.375] Adding DataSet accelerator: EMBREE
[LuxRays][1016.375] Total vertex count: 71893735
[LuxRays][1016.375] Total triangle count: 24151310
[LuxRays][1018.250] EmbreeAccel build time: 1875ms
[LuxRays][1018.797] [Device GeForce RTX 2080 Ti OpenCLIntersect] BVH mesh vertices buffer size: 842504Kbytes
[LuxRays][1019.859] [Device GeForce RTX 2080 Ti OpenCLIntersect] BVH nodes buffer size: 1125128Kbytes
[LuxRays][1020.266] [BVHKernel] Compiler options: -D LUXRAYS_OPENCL_KERNEL -D PARAM_RAY_EPSILON_MIN=1e-05f -D PARAM_RAY_EPSILON_MAX=0.1f -D LUXRAYS_OPENCL_DEVICE -D LUXRAYS_OS_WINDOWS -cl-fast-relaxed-math -cl-mad-enable
[LuxRays][1020.266] [BVHKernel] Compiling kernels
[LuxRays][1020.266] [BVHKernel] Program cached
[LuxRays][1020.797] [Device GeForce RTX 2080 Ti OpenCLIntersect] BVH mesh vertices buffer size: 842504Kbytes
[LuxRays][1021.875] [Device GeForce RTX 2080 Ti OpenCLIntersect] BVH nodes buffer size: 1125128Kbytes
[LuxRays][1022.266] [BVHKernel] Compiler options: -D LUXRAYS_OPENCL_KERNEL -D PARAM_RAY_EPSILON_MIN=1e-05f -D PARAM_RAY_EPSILON_MAX=0.1f -D LUXRAYS_OPENCL_DEVICE -D LUXRAYS_OS_WINDOWS -cl-fast-relaxed-math -cl-mad-enable
[LuxRays][1022.266] [BVHKernel] Compiling kernels
[LuxRays][1022.266] [BVHKernel] Program cached
[LuxCore][1022.344] [PathOCLRenderEngine] OpenCL task count: 524288
[LuxCore][1022.344] [PathOCLBaseRenderEngine] OpenCL max. page memory size: 2883584Kbytes
Is it weird that it does the BVH and compilation twice? I do have 2 RTX 2080 Ti so I suppose that's related. But I wonder if only 1 of them is being freed after the render?
I'll try some more tests (1 GPU only... CPU only...) and see what happens...
I'm using Blender 2.83 beta with latest daily BlendLuxCore (20b0093) on Windows 10. nVIDIA GeForce Game Ready Driver 441.66. Exact hardware in my signature.
Edit: CPU-only gives no issues. Running on a single GPU gives the same problem as shown above (except that it only does the BVH and compilation once), and when the memory amount reaches the max, Blender crashes and closes instantly.
Edit 2: I get the same result in Blender 2.82a. Just before each successive frame, the memory usage seems to go up around 155mb (between approx. 154mb and 167mb; sample size: about 12 frames)
Edit 3: Increase seems relatively constant at about 155mb, even when varying the render resolution and rendering a completely different .blend file
Edit 4: Finally figured out why CUDA wasn't working.
nvrtc64_101_0.dll is missing from the BlendLuxCore-latest-win64.zip! Managed to find a copy from a previous CUDA-specific build. Now CUDA is working, and the memory gets freed after a render. So maybe it's just an OpenCL specific problem right now?
Edit 5: Ha, the DLL is now back in the new daily build.
Edit 6: Decided to test it - switched from CUDA back to OpenCL and rendered a few frames. The difference is quite noticeable:
- CUDA (left) vs OpenCL (right)