Parsim function consumes lot of memory. How to clear temporary MATLAB files?
44 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone,
I'm running lots of simulations with parsim function. I realized that MATLAB started to store lots of temporary files in the "AppData\Local\Temp" folder. The used memory was increasing rapidly, and I received an alert from windows that the system memory was running out!
Then I divided the simulation in several parsim sessions, but the memory runned out again. Does it exists a way to clear those temporary files in that folder which have been created by MATLAB? Maybe I could do it between the various parsim sessions.
Thank a lot, Antonio
0 Kommentare
Antworten (3)
Max Helbing
am 20 Feb. 2019
Bearbeitet: Max Helbing
am 20 Feb. 2019
I'm running into the same problem. When I use
parsim(simIn)
MATLAB stores loads of data in "AppData\Local\Temp".
I already tried
Simulink.sdi.cleanupWorkerResources
after all simulations are done. But this is a just kind of a "cleanUpFcn" and does not prevent MATLAB to increasingly consume memory while performing parallel simulations.
I don't know where to integrate:
parfevalOnAll(gcp, @sdi.Repository.clearRepositoryFile, 0)
Is there a way to implement a "cleanUpFcn" that deletes all the unused temporary files in the simIn.postSimFcn? This would clean temporary working folders after each simulation.
3 Kommentare
Max Helbing
am 26 Sep. 2019
Unfortunately, I haven't found a solution. To make it work, I cleared memory, which is probably the simplest but definitely not the most elegant solution.
Tony Mohan Varghese
am 19 Mär. 2018
Use the following command to clear the temporary files.
>> parfevalOnAll(gcp, @sdi.Repository.clearRepositoryFile, 0)
Temporary files are usually .dmr files created by SDI (Simulink Data Inspector). Here are the references: https://in.mathworks.com/help/distcomp/parfevalonall.html https://in.mathworks.com/help/simulink/slref/simulink.sdi.cleanupworkerresources.html
0 Kommentare
Reid Spence
am 12 Apr. 2024
For issues with computer running out of disk space refer to:
For issues related to running out of memory (RAM), refer to:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!