Referenced model Makefiles are not generated for rsim parallel build with GenCodeOnly disabled
조회 수: 3 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2020년 6월 10일
답변: MathWorks Support Team
2020년 12월 7일
I am encountering an issue where Makefiles for referenced models are not generated in the expected place under certain conditions:
- Model must contain two or more different model references
- SystemTargetFile = rsim.tlc
- GenCodeOnly = 'off'
- EnableParallelModelReferenceBuilds = 'on'
When "GenCodeOnly" is toggled on, the Makefiles for the referenced models are located at "slprj/rsim/<model_ref_name>". When "GenCodeOnly" is toggled off, these Makefiles are no longer present there.
How can I generate these Makefiles in the expected place?
채택된 답변
MathWorks Support Team
2020년 6월 10일
The Makefiles generated and executed on the parallel workers are invalid when they are copied back to the client, as all the paths in the Makefiles are relative to the temporary build folders used by the workers. In previous releases, the Makefiles were regenerated on the client during the merge phase, but this is expensive and unnecessary for the parallel build to succeed.
When "GenCodeOnly" is on, where the intention is to compile the code at a later point, the Makefiles are still regenerated. However, when "GenCodeOnly" is off, the Makefiles are discarded which gives a performance boost depending on the size/structure of the model reference hierarchy.
One possible workaround is to regenerate the Makefiles with the "rtwrebuild" command:
Another workaround is to call "rtwbuild" twice, once with "GenCodeOnly" on, and once with "GenCodeOnly" off:
rtwbuild('model_name'); % GenCodeOnly='on';
rtwbuild('model_name', 'generateCodeOnly', false);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Parallel Computing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!