Running Simulink model in a loop causes Windows memory issues
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Igor
el 22 de Abr. de 2020
Comentada: Helder Magalhães
el 21 de Oct. de 2021
Hi,
I am running Simulink model in a loop to test various cases, i.e. do a sweep across range of parameters. My code is:
for i = 1:numColsVin
for j = 1:numColsRload
for k = 1:numColsfout
model = 'SimulinkModelv001';
load_system(model);
sim(model);
% Some code
end
end
end
After 10 or so iterations I have noticed that my disk memory increases, i.e. I get Windows warning that hard drive is running out of space and MATLAB closes. I have been running the same code on version 2012b, 2014b and 2015a never had similar issues. I am logging data, doing post-processing and printing after each iteration.
And when I say memory increase, it is more than 200 GB for 10 iterations!! I don't know where the data is located and I keep getting Windows warnings to remove some data from my hard drive. Only MATLAB was running when this happened. What is all that data? How to delete? How to disable from appearing? Is there any settings in the Simulink to prevent this?
Kind regards
3 comentarios
Helder Magalhães
el 21 de Oct. de 2021
This problem seems to be a known issue: Size of temporary DMR file that stores logged simulation data increases with each simulation run in rapid accelerator mode (2507175).
As stated, a fix is only available in R2021b; the proposed workaround is the one in the accepted answer (Simulink.sdi.clear).
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Configure and View Diagnostics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!