Simulink ERT Codegen for (openMP) Parelel Run

2 visualizzazioni (ultimi 30 giorni)
Kraker
Kraker il 12 Dic 2024
Modificato: Kraker il 12 Dic 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?

Risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by