How is the Simulink total block I/O size calculated exactly? It would help me prevent the I/O buffer size error
조회 수: 6 (최근 30일)
이전 댓글 표시
I have a wind farm simulation model which computes among others wind speeds at millions of grid nodes in a three-dimensional volume. The model mainly consists of c s-functions.
When increasing the number of nodes in a uniform grid - basically a three-dimensional matrix - further and further, at some point I get this message:
Simulink supports total block I/O buffer size up to 2147483647 number of bytes. The total block I/O size is calculated based on data type size, number of elements, and signal type (real/complex) of all signals in the model. Consider reducing signal sizes before compiling or simulating the model.
How is the "total block I/O buffer size" exactly determined? I'd love to see a more precise definiton of "The total block I/O size is calculated based on data type size, number of elements, and signal type (real/complex) of all signals in the model."
Let's assume there are two c s-functions (mex). Will all these things contribute to the "total block I/O buffer size":
- number of inputs and outputs
- dimensions and size of inputs and outputs
- dialog parameters
- internal DWork
- internal variables (int_T, real_T, real32T, vectors, pointers, ...)
- function step size (I have a multi rate model)
- number of computations/functions per time step
As it says "total block I/O buffer size", I would assume only and exclusively dimensions and size of block inputs/outputs within the simulink model are considered. Applying this logic to a simple Simulink model configuration as shown here:
I would guess the "total block I/O buffer size" is the sum of:
- 1000 (from C1)
- 1000 (to c s-function input)
- 200x50x20 (from C2)
- 200x50x20 (to gain)
- 200x50x20 (from gain)
- 200x50x20 (to c s-function)
- 3 times 700x50x20 (from c s-function)
- 3 times 700x50x20 (to "To Workspace" block)
ist that correct? Or is there some redundancy/duplication in this approach? Or did I miss something?
댓글 수: 0
채택된 답변
Sumukh
2024년 8월 5일
Hi v k.
MATLAB documentation does not provide details regarding how exactly the total block I/O size in Simulink is calculated. The limit on the total block I/O size is the maximum size of 32-bit signed integer (2^31-1=2147483647) for 64-bit systems, up to MATLAB R2019a, as given by below documentation:
However, the total block I/O size limit has been increased to that of a 64-bit integer size (2^64-1) on 64-bit systems, from MATLAB R2019b, as provided in the release notes below:
I would suggest you upgrade to MATLAB R2019b to increase the total block I/O size limit, as well as try to reduce the no. of Simulink blocks in the model.
I do hope this helps with your issue.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!