Azzera filtri
Azzera filtri

Simulink rapid acceleration creates temp files which fill drive

5 visualizzazioni (ultimi 30 giorni)
I set up a parfor-loop which simulates a Simulink-model, like in this tutorial:
It works great and fast, but each Sim Command executes a exe-File which writes the Simulation output (tout, yout) to a temp file like "oup5ec41494_5f3b_4a75_8e18_0978da1bc809.mat" in the "slprj\raccel\modelname"-folder.
The file is being deleted after evaluation, but only to windows trash, so after thousands of iterations (I use the parfor loop in a genetic algorithm), my hard disk drive is full (after creating 160GB temp files). Is there a possibility, to make matlab delete the temp files without trash?
I am using Matlab 2012b with Windows 7 x64.

Risposta accettata

schapplm il 5 Dic 2013
In Matlab 2013a, the problem seems to be solved.

Più risposte (1)

Ryan G
Ryan G il 4 Dic 2013
What's your parfor loop look like? You might be able to do something like
parfor i = 1:100
eval(['myOutput' num2str(i) ' = sim(gcs)'])
%Not sure exact syntax, try not to use eval if possible
% Process algorithm here
delete(['myOutput' num2str(i)])
  1 Commento
schapplm il 5 Dic 2013
using the eval function does not help, because the temp file is generated outside matlab in the model-.exe-file that is generated by the rapid accelerator. So i cannot delete the temp-file in Matlab either, since it is deleted to recycle bin by the model.exe.
% Build the Rapid Accelerator target (create .exe-file)
rtp = Simulink.BlockDiagram.buildRapidAcceleratorTarget(sl_Modellname);
parfor i=1:100
parameterSet = Simulink.BlockDiagram.modifyTunableParameters(rtp, ...
'EKF_Q', EKF_Q, 'EKF_P0', EKF_P0); % modify some parameters
simOut= sim(sl_Modellname, ...
'SimulationMode', 'rapid', ...
'RapidAcceleratorUpToDateCheck', 'off', ...
'RapidAcceleratorParameterSets', parameterSet);
% calculations with simOut
% ...

Accedi per commentare.


Scopri di più su Multicore Processor Targets in Help Center e File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by