When using 'sim' in a for loop in accelerator mode I get an 'accelbuild' error after 5,6 or sometimes 18 iterations.

조회 수: 1 (최근 30일)
I am doing a Monte Carlo simulation of a simulink model with Matlab 2015b using the sim command
SimOuts = sim(ModelName, 'LoadExternalInput', 'on',...
'ExternalInput', 'SimIns',...
'SimulationMode', 'accelerator');
Unfortunately, after several iterations of the model running fine, I get
Error using accelbuild (line 50)
Problem creating Accelerator MEX file for model
'my_model'.
To see the build output, use
set_param('my_model','AccelVerboseBuild','on')
Error in run_test_harness (line 6)
accelbuild(ModelName);
Caused by:
Error using accelbuild (line 50)
Unable to write file
C:\Projects\my_project\work\slprj\accel\my_model\compileInfo.mat:
permission denied.
Last night it occurred on the 18 iteration. I don't get how it runs and builds fine 17 times and then has some permissions error on the 18th.
  댓글 수: 1
Chinmayi Lanka
Chinmayi Lanka 2017년 1월 20일
What kind of blocks do you have in your model? I tried a similar workflow with the example model 'vdp' and had no issues.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by