How do I avoid 'compiler limit: compiler stack overflow' while building a model for rapid accelerator mode?

8 次查看(过去 30 天)
I have a large Simulink model and I am using Rapid Accelerator mode to improvement simulation performance. The model runs fine in Accelerator mode, however, when the model builds for Rapid Accelerator mode, a compiler stack overflow error is thrown by the compiler.
ERROR: The error message indicates as follows:
'fatal error C1063: compiler limit: compiler stack overflow'

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2020-12-1

The error message is due to a limitation with the Microsoft compiler running out of stack.  For more information about the Microsoft compiler error C1063, please refer to following online documentation:

The root cause is that the code generated from a large Simulink model is too big and variables that are stored during compilation may end up using all of compiler stack. The default compiler stack size is 1 MB for a Microsoft compiler. Increasing the compiler stack size will resolve this error message. 
The following are few way to increase compiler stack size:
  1) Use EDITBIN on the "cl.exe" file to update the stack size as follows:
  • Open a command prompt as administrator mode from the following path:
Start > Microsoft Windows SDK 7.1 -> Open 'Windows SDK 7.1 Command Prompt'
  • In the command prompt, navigate to the path of the compiler used in Simulink:
>> cd C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
  • Execute the following command to set the increase stack size:
>> editbin /STACK:10000000 cl.exe
>> cd amd64
>> editbin /STACK:10000000 cl.exe
2) Use Compiler flag - '/F <stack size>'

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multicore Processor Targets 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by