Fluid simulation needs more memory than displayed #40203
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40203
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows 7 (64 bit with service pack 1)
Intel Core i7-2670QM @ 2.20GHz
16 GB RAM
NVIDIA GeForce GT540M
Blender Version
Broken: example: 2.70a (64bit)
Worked: unknown
Short description of error
The idea for the animation is for liquid metal to pour into a mold. The Fluid simulation estimated to use 7MB of RAM and when the mold obstacle is set to Volume then it calculates just fine.
Changing mold obstacle to Shell causes simulation to use all available RAM (16 GB) and if process not killed, crash the machine.
Exact steps for others to reproduce the error
Open the attached .blend
Confirm Mold object is set to Shell
Select Gold domain
Press Bake.
Example of memory usage. As you can see the simulation has gone bezerk and used the entire 16 GB RAM. If left, my system eventually seizes up and a hard reset (i.e. power off) is required.
cc_test_3_-_broken.blend
Changed status to: 'Open'
Added subscriber: @AndrewButtery
Fluid simulation estimated to use 7MB of RAM. Changing obstacle to Shell causes simulation to use all available RAM (16 GB) and if process not killed, crash the machine.to Fluid simulation needs more memory than displayedAdded subscribers: @genscher, @Sergey
@genscher, can you please have a look?
but the thing is, it's not always possible to predict how much memory is gonna to be used by the external library. And blender can only predict memory it requests from the system. Because of the fragmentation physical memory usage might be much higher..
Added subscriber: @mont29
Added subscriber: @totoro-4
I can confirm this on Linux 64bit too. And the result is the same as "Shell" when the "Both" mode used. "Shell" mode runs away with the memory almost immediately but the "Volume" mode finishes quickly with low memory consumption (roughly 250 MB).
So, after some debugging, this memory allocation boom happens exactly in the cycle beginning at line 531 of elbeem/intern/ntl_geometryobject.cpp in function ntlGeometryObject::initMovingPoints(double time, gfxReal featureSize).
For VOLUMEINIT_VOLUME, the triangles.size() returns 64 here but for VOLUMEINIT_SHELL, it's 10364. I think this big number causes the large allocation in the cycle.
This function was called from line 1811 of elbeem/intern/solver_init.cpp. This call happens twice at the start of VOLUMEINIT_SHELL and only once at the start of VOLUMEINIT_VOLUME. The memory boom happens at the first call. I hope this helps to solve the problem.
That's fantastic Fazekas!
Thanks for spending the time to look into this one and also hope this helps the developers to find the problem...
Looks like real issue would be in elbeem then… Think will just add a warning about shell options (that they might induce huge mem consumption), and close that report (and we expect a brand new system for fluid simulations in coming months…).
Thanks for the report and nice investigation, in any case!
Also, note that mem usage annonced is the mem needed for the bake cache itself, not the mem needed to compute that cache.
This issue was referenced by
c4814c8764
Changed status from 'Open' to: 'Resolved'
Closed by commit
c4814c8764
.