Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added measureTime-test to cppruntime-hpcom
- fmu 1.0 modelExchange tests are now simulated after export
- Loading branch information
1 parent
bee07d6
commit d243ca3
Showing
7 changed files
with
158 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
...untime/hpcom/Modelica.Electrical.Analog.Examples.CauerLowPassSC_level_omp_measureTime.mos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// name: Modelica.Electrical.Analog.Examples.CauerLowPassSC_HPCOM_Level_OMP_measureTime | ||
// keywords: simulation MSL Examples | ||
// status: correct | ||
// | ||
// Simulation Results | ||
// Modelica Standard Library | ||
// | ||
|
||
loadModel(Modelica,{"3.2.1"}); getErrorString(); | ||
|
||
runScript("ModelTestingDefaults.mos");getErrorString(); | ||
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation; | ||
modelName := $TypeName(Modelica.Electrical.Analog.Examples.CauerLowPassSC); | ||
timeout := 600; | ||
|
||
compareVars := | ||
{ | ||
"R4.Capacitor1.v", | ||
"R5.Capacitor1.v", | ||
"R8.Capacitor1.v", | ||
"R9.Capacitor1.v", | ||
"R1.Capacitor1.v", | ||
"R2.Capacitor1.v", | ||
"R3.Capacitor1.v", | ||
"Rp1.Capacitor1.v", | ||
"R7.Capacitor1.v", | ||
"R10.Capacitor1.v", | ||
"R11.Capacitor1.v", | ||
"C3.v", | ||
"C7.v", | ||
"C1.v", | ||
"C4.v", | ||
"C8.v" | ||
}; | ||
|
||
setCommandLineOptions("+profiling=all +simCodeTarget=Cpp"); getErrorString(); | ||
simulate(modelName, stopTime=10.0); | ||
echo(false); | ||
profilingContent := readFile("Modelica.Electrical.Analog.Examples.CauerLowPassSC_prof.json"); getErrorString(); | ||
writeFile("Modelica.Electrical.Analog.Examples.CauerLowPassSC_eqs_prof.json", profilingContent); getErrorString(); | ||
echo(true); | ||
|
||
setDebugFlags("hpcom"); getErrorString(); | ||
setCommandLineOptions("+n=2 +hpcomScheduler=level +hpcomCode=openmp"); getErrorString(); | ||
|
||
runScript(modelTesting);getErrorString(); | ||
|
||
// Result: | ||
// true | ||
// "" | ||
// "\"true | ||
// \" | ||
// OpenModelicaModelTesting.SimulationRuntime.Cpp | ||
// \"mat\" | ||
// true | ||
// " | ||
// "" | ||
// OpenModelicaModelTesting.Kind.VerifiedSimulation | ||
// Modelica.Electrical.Analog.Examples.CauerLowPassSC | ||
// 600 | ||
// {"R4.Capacitor1.v","R5.Capacitor1.v","R8.Capacitor1.v","R9.Capacitor1.v","R1.Capacitor1.v","R2.Capacitor1.v","R3.Capacitor1.v","Rp1.Capacitor1.v","R7.Capacitor1.v","R10.Capacitor1.v","R11.Capacitor1.v","C3.v","C7.v","C1.v","C4.v","C8.v"} | ||
// true | ||
// "" | ||
// record SimulationResult | ||
// resultFile = "Modelica.Electrical.Analog.Examples.CauerLowPassSC_res.mat", | ||
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 1500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Analog.Examples.CauerLowPassSC', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", | ||
// messages = "Profiling results written to Modelica.Electrical.Analog.Examples.CauerLowPassSC_prof.json | ||
// " | ||
// end SimulationResult; | ||
// true | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// Using json-file | ||
// Using level Scheduler for the DAE system | ||
// Using level Scheduler for the ODE system | ||
// Using level Scheduler for the ZeroFunc system | ||
// HpcOm is still under construction. | ||
// Simulation options: startTime = 0.0, stopTime = 60.0, numberOfIntervals = 1500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Analog.Examples.CauerLowPassSC', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '' | ||
// Result file: Modelica.Electrical.Analog.Examples.CauerLowPassSC_res.mat | ||
// Messages: Profiling results written to Modelica.Electrical.Analog.Examples.CauerLowPassSC_prof.json | ||
// | ||
// Files Equal! | ||
// "true | ||
// " | ||
// "" | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters