Free memory when running multiple simulations from same python script #3088
-
Hi everyone, I am trying to run a set of sequential simulations from the same python3 script. The basic structure of my main .py file looks like:
Basically, I just need to run 10 steps for each simulation. Once those steps are done, I do not need any simulation-related variable anymore. Thus, I would like to delete all the simulation-related stuff after those 10 simulation steps, and free the memory. This does not happen at the moment, because cleanup is never called. I tried both to delete Is there a way to force the cleanup and free all the simulation-related memory in python? I would like to avoid running each simulation within a different runsofa/python process in order to ensure that. I am using SOFA 21.12 with python3.8 on Ubuntu 20.04. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Oh oh oh @etagliabue :) good to have you back here! For such a question @damienmarchal would be the man. |
Beta Was this translation helpful? Give feedback.
-
Hi!
And let it run for a while. This is the memory usage after 20 or so resets: When removing the With a reset after every 20 steps: So pretty similar, right? Cheers, |
Beta Was this translation helpful? Give feedback.
Fixed in sofa-framework/SofaPython3#301