cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RAM Usage Problem when calling external Python script

RAM Usage Problem when calling external Python script

Hi, I found there is a RAM problem when FlexSim model calls python scripts -- the arguments passed to python seems not cleaned-up, which accumulate RAM usage, slows down the simulation significantly, and eventually blocked everything. 
This is a big problem for my team as we use external python algorithms to process large datasets from simulation. When the RAM are totally used up by FlexSim, we could no longer call the algorithms sufficiently.
I use the attached model & script to identify the problem. The model does nothing but passing large inputs to a dummy python script. My RAM got peaked to 32G after 3000 python calls.

FlexSim_RAM_Problem.jpg

I further observed that:
1) The complexity of the python script does not worsen the problem
2) The computation data generated internally in python does not worsen the problem
3) The size of the python output does not worsen the problem
4) Cleaning the input in FlexScript (e.g., rewrite it to NULL or use Map.clear()) does not mitigate the problem
5) Cleaning the input in python (e.g., rewrite it to NULL or use del & gc.collect()) does not mitigate the problem

So, I feel the problem is only on the model side that the arguments passed to external python are not getting cleaned. 
Do you think there is, or will be, a solution? 

Thank you

8 Comments
m_kranz4C68A
Explorer

Hello,

 

we are running into the exact same issue with our model. We are training a model with the PPO in python and tested different hyperparameter configurations, but the training cannot be finished due to a shutdown of our computer. The reason for that is, that the RAM usage of FlexSim ist getting too high and then the computer shuts down completely. 

 

We are also on this for quite a while and would be happy for any ideas or solutions!

Jeanette_Fullmer
Community Manager

Hello,

The development team has been notified of this, and a report has been made for them to further investigate the issue. 

Jeanette_Fullmer
Community Manager
Status changed to: Under Review
 
m_kranz4C68A
Explorer

Hello @Jeanette_Fullmer,

 

it has been a month since your message. Do you have any update for us on the investigation of the issue? 

Jeanette_Fullmer
Community Manager

Hello @m_kranz4C68A ,

I do not have an update regarding this. I will ask the development team if they can escalate this. 

Jeanette_Fullmer
Community Manager

Hello @m_kranz4C68A,

 

I can confirm that the development team has escalated this issue. I will let you know if I hear anything else regarding this case. 

parker_standing
Community Manager

@donghuangliUNJR4 @m_kranz4C68A 

 

This bug was addressed in the latest LTS and Stable versions.

parker_standing
Community Manager
Status changed to: Implemented
 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea