sebbas / blender-mantaflow

Mantaflow integration in Blender
https://developer.blender.org/diffusion/B/browse/fluid-mantaflow/
Other
101 stars 12 forks source link

Extreme RAM usage on simple scene #13

Closed GottfriedHofmann closed 6 years ago

GottfriedHofmann commented 6 years ago

I have this very simple scene which is the same as the one used for this test: https://github.com/sebbas/BlenderMantaflow/issues/9#issuecomment-346583394

The only difference is that the file now uses additional settings from the latest mantaflow build like viscosity and domain real world size.

comparison.01.zip

I first simulated the elbeem simulation, then tried to bake the mantaflow simulation which resulted in ~ 40 GByte(!) of RAM usage for a simulation that has a resolution of only 256. It also baked fine with way less RAM usage in earlier versions so I guess there is something wrong here :(

sebbas commented 6 years ago

That sounds like a grid that doesn't get deallocated via Python correctly or at all. Let me check, maybe something went wrong when I added the viscosity setup ...

(40 GB RAM - you have a powerful machine :)

sebbas commented 6 years ago

Okay, I think that 8b46cf45f7453cad3645d190800d4eea5ccd4db4 fixes the issue. Can you confirm that on your machine?

Not sure what exactly did not get deallocated. The Python cleanup is much nicer now though and bugs like these should not happen again

GottfriedHofmann commented 6 years ago

Now I get the following error when testing it with said file:

Read blend: /home/g/blenderprojects/manta/comparison.01.blend Error in ParticleSystem::advectInGrid.758s), ETC: 1m 15s Traceback (most recent call last): File "<string>", line 1, in <module> File "<string>", line 142, in manta_step_2 File "<string>", line 181, in liquid_step_2 RuntimeError: std::bad_alloc Killed