Simulink setConfig showing error while Updating References for each worker in parallel parfor
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am running Simulink Model, which is set to Never Rebuild, in parfor.
Looks like setConfig is showing error with Simulink Model References are being updated.
This is resulting in following error:
Error using Simulink.fileGenControl A build is in progress. During a build the only actions allowed are:
'getConfig'
'get'
Error in Simulink.fileGenControl
Note:
It's required to define CacheFolder & CodeGenFolder for each run although its a same folder.
Code Outline:
% Running first time to create slprj folder
buildFolder = 'C:\Users\Documents\Work\temp';
cfg = Simulink.fileGenControl('getConfig');
cfg.CacheFolder = buildFolder;
cfg.CodeGenFolder = buildFolder;
Simulink.fileGenControl('setConfig', 'config', cfg);
open_system('Simulink_Model')
sim('Simulink_Model')
parfor i=1:3
buildFolder = 'C:\Users\Documents\Work\temp';
cfg = Simulink.fileGenControl('getConfig');
cfg.CacheFolder = buildFolder;
cfg.CodeGenFolder = buildFolder;
Simulink.fileGenControl('setConfig', 'config', cfg);
open_system('Simulink_Model')
sim('Simulink_Model')
end
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Deep Learning with Simulink 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!