Issue to remove generated mex file after Simulink Model execution in parfor
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to run a Simulink model inside a parfor loop.
Since the model involves code generation, each parallel iteration runs in a different temporary directory, as suggested in the related documentation. This is to avoid data concurrency issues.
In particular, after the execution of the model using the sim command, one wants to remove the temporary directory with its content, in order to avoid accumulating useless temp data.
However, when running rmdir(tmpdir,'s') I get the error
"C:\path\myModel_sfun.mexw64 could not be removed".
I tried adding the commands
munlock myModel_sfun.mexw64
fclose('all')
close_system(mymodel,0)
But this doesn't help. Any help? Thanks Luca
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Simulink Coder dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!