Simulink ERT Codegen for (openMP) Parelel Run

4 visualizaciones (últimos 30 días)
Kraker
Kraker el 12 de Dic. de 2024
Editada: Kraker el 12 de Dic. de 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?

Respuestas (0)

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by