Simulink ERT Codegen for (openMP) Parelel Run

8 Ansichten (letzte 30 Tage)
Kraker
Kraker am 12 Dez. 2024
Bearbeitet: Kraker am 12 Dez. 2024

Hi,
I have simulink model thats contains multiple reference models. One them has contionus time solver others have discrete sample.
C++ code(ERT config) is generated from simulink model witouth problem. Also code is builded in Visual studio and .exe is running properly. Both exe and simulink model giving same results.
I want to run model for different input for Monte Carlo analysis. Hence, i added for loop above to step function which changes inputs. It also works.
The issue here is that when I try parelel for loop (used omp lib, such as added "#pragma omp parelel for" ), it is running at different threads. However, for same inputs results are different.
Is there any way to make simulink generated code to run on parelel for loop with different inputs?

Antworten (0)

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by