Why does the Simulink Accelerator in Simulink Performance Tools 1.2 (R13) and later fail to build large models when using MS Visual C 6.0?
1 次查看(过去 30 天)
显示 更早的评论
When I try to accelerate I see the message:
Unable to acquire handle to MATLAB function '<model_name>_acc'
If I look in the accelerator build output above the previous line in the MATLAB command window I see:
fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
采纳的回答
MathWorks Support Team
2009-6-27
This happens to models with large data sets when using Simulink Accelerator in Simulink Performance Tools 1.2 (R13) and later. The default options for MEX for Microsoft Visual C 6.0 are not adequate to handle them. You will need to modify the mexopts.bat file that you use for accelerating this model. There are 2 steps required to this:
1) Create the modified mexopts.bat file
1a) Copy the existing mexopts.bat file for MSVC6.0 (refer here for more information)
1b) Modify the COMPFLAGS line to add "-Zm500". The integer you need to add may be bigger or smaller than 500 depending on the size of your data set. The final line will look something like this:
set COMPFLAGS=-c -Zp8 -G5 -W3 -DMATLAB_MEX_FILE -nologo -Zm500
2) Tell the model to use it with the Accelerator
2a) Create a MAKE command that references the new definition of the MEX_OPT_FILE location variable. It will look like this:
makeCmd = ['make_rtw MEX_OPT_FILE="-f fullpath\mymexopts.bat"'];
2b) Configure your model to use the new MAKE command string by typing the following at the MATLAB command prompt:
set_param('your_model_name','AccelMakeCommand',makeCmd);
--------------
There is another approach outlined in the related solution that involves modifying the TMF file.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!