Trying to capture the build summary using ert_make_rtw_hook

3 ビュー (過去 30 日間)
Dawn Voss
Dawn Voss 2023 年 2 月 1 日
回答済み: Harsh 2025 年 2 月 20 日
Upgraded to R2022b and the diary does not capture the build summary that is output. I moved my sldiagviewer.diary('off');to the exit case of the hook, but I want my top model codegen log to contain the build summary. I noticed that if I turn off the parallel pool I can capture the build summary, but with the parallel pool turned on no summary gets printed to my diary file. Any ideas? I can't seem to programatically turn the parallel pool off before codegen.

回答 (1 件)

Harsh
Harsh 2025 年 2 月 20 日
Hi Dawn,
Consider the following approaches to capture the build summary:
  • Wrap everything inside your “parforin a function. Then you can create an “if” condition to run the “parfor” loop only when the “Parallel” flag is set to 1. This will enable you to edit and debug your code in the function and before codegen you can set the “Parallel” flag to 0. Belos is a sample code snippet to achieve this:
if Parallel
parfor 1:N
output = function(..)
end
else
for 1:N
output = function(..)
end
end

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by