Skip to content

Commit

Permalink
Add 'testsuite/' from commit 'cabd6f22a34e3402ec62426f92475b945e3d977b'
Browse files Browse the repository at this point in the history
git-subtree-dir: testsuite
git-subtree-mainline: 9469788
git-subtree-split: cabd6f2
  • Loading branch information
sjoelund committed Apr 3, 2019
2 parents 9469788 + cabd6f2 commit 83ebb9b
Show file tree
Hide file tree
Showing 7,978 changed files with 888,274 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions testsuite/.gitattributes
@@ -0,0 +1,6 @@
Makefile* text eol=native
*.mo text eol=lf
*.mos text eol=lf
*.c text eol=lf
*.h text eol=lf
*.pl text eol=lf
19 changes: 19 additions & 0 deletions testsuite/.gitignore
@@ -0,0 +1,19 @@
*.o
*.so
*_info.json
*.fail_log
/failed.*
difftool/lex.yy.c
openmodelica/bootstrapping/CodegenC.*
openmodelica/bootstrapping/CodegenUtil.tpl
openmodelica/bootstrapping/SimCodeTV.mo
openmodelica/bootstrapping/mine
openmodelica/bootstrapping/theirs
/runtest.db.*
simulation/libraries/msl32/Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.csv
simulation/modelica/solver/externalInput.csv
# Reference files are stored as .mat.xz
ReferenceFiles/**/*.mat
/invalid-files.log
/invalid-files.sorted
/.gitvalidfiles.sorted
259 changes: 259 additions & 0 deletions testsuite/.gitvalidfiles

Large diffs are not rendered by default.

Binary file added testsuite/AVM/avm.xlsx
Binary file not shown.
17 changes: 17 additions & 0 deletions testsuite/AVM/electrical/clean.cmd
@@ -0,0 +1,17 @@
@echo off
rem cleanup the mess
del *.exe 2> nul
del *.c 2> nul
del *.h 2> nul
del *.libs 2> nul
del *.makefile 2> nul
del *.mat 2> nul
del *.csv 2> nul
del *.o 2> nul
del *.log 2> nul
del *.xml 2> nul

rem cleanup dymola mess
del buildlog.txt 2> nul
del ds*.txt 2> nul
del dymosim.* 2> nul
@@ -0,0 +1,2 @@
simulateModel("Modelica.Electrical.Analog.Examples.CauerLowPassSC");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Electrical.Analog.Examples.CharacteristicThyristors");
exit();
@@ -0,0 +1,2 @@
loadModel(Modelica,{"3.1"});
simulate(Modelica.Electrical.Analog.Examples.CauerLowPassSC, stopTime=1); getErrorString();
@@ -0,0 +1,6 @@
loadModel(Modelica,{"3.2.1"});

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes);
getErrorString();
@@ -0,0 +1,6 @@
loadModel(Modelica,{"3.2.1"});

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Electrical.Analog.Examples.CharacteristicThyristors);
getErrorString();
17 changes: 17 additions & 0 deletions testsuite/AVM/fluid/clean.cmd
@@ -0,0 +1,17 @@
@echo off
rem cleanup the mess
del *.exe 2> nul
del *.c 2> nul
del *.h 2> nul
del *.libs 2> nul
del *.makefile 2> nul
del *.mat 2> nul
del *.csv 2> nul
del *.o 2> nul
del *.log 2> nul
del *.xml 2> nul

rem cleanup dymola mess
del buildlog.txt 2> nul
del ds*.txt 2> nul
del dymosim.* 2> nul
@@ -0,0 +1,2 @@
checkModel("Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks");
exit();
@@ -0,0 +1,2 @@
checkModel("Modelica.Fluid.Examples.DrumBoiler.DrumBoiler");
exit();
@@ -0,0 +1,2 @@
checkModel("Modelica.Fluid.Examples.Explanatory.MeasuringTemperature");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Fluid.Examples.DrumBoiler.DrumBoiler");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Fluid.Examples.Explanatory.MeasuringTemperature");
exit();
@@ -0,0 +1,8 @@
loadModel(Modelica,{"3.2.1"});

// adrpo: add missing stateGraphRoot inner class
addComponent(stateGraphRoot, StateGraph.StateGraphRoot, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks);
setComponentProperties(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks, stateGraphRoot, {false,false,false,false,false},{""},{true,false},{""}); getErrorString();
setComponentComment(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks, stateGraphRoot, "added to make the model complete"); getErrorString();

checkModel(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks); getErrorString();
@@ -0,0 +1,3 @@
loadModel(Modelica,{"3.2"});getErrorString();
checkModel(Modelica.Fluid.Examples.DrumBoiler.DrumBoiler);getErrorString();

@@ -0,0 +1,2 @@
loadModel(Modelica,{"3.2.1"});
checkModel(Modelica.Fluid.Examples.Explanatory.MeasuringTemperature); getErrorString();
@@ -0,0 +1,11 @@
loadModel(Modelica,{"3.2.1"});

// adrpo: add missing stateGraphRoot inner class
addComponent(stateGraphRoot, StateGraph.StateGraphRoot, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks);
setComponentProperties(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks, stateGraphRoot, {false,false,false,false,false},{""},{true,false},{""}); getErrorString();
setComponentComment(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks, stateGraphRoot, "added to make the model complete"); getErrorString();

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks);
getErrorString();
@@ -0,0 +1,3 @@
loadModel(Modelica,{"3.2"});getErrorString();
simulate(Modelica.Fluid.Examples.DrumBoiler.DrumBoiler);getErrorString();

@@ -0,0 +1,6 @@
loadModel(Modelica,{"3.2.1"});

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Fluid.Examples.Explanatory.MeasuringTemperature);
getErrorString();
17 changes: 17 additions & 0 deletions testsuite/AVM/multibody/clean.cmd
@@ -0,0 +1,17 @@
@echo off
rem cleanup the mess
del *.exe 2> nul
del *.c 2> nul
del *.h 2> nul
del *.libs 2> nul
del *.makefile 2> nul
del *.mat 2> nul
del *.csv 2> nul
del *.o 2> nul
del *.log 2> nul
del *.xml 2> nul

rem cleanup dymola mess
del buildlog.txt 2> nul
del ds*.txt 2> nul
del dymosim.* 2> nul
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot",stopTime=0.01);
exit();
@@ -0,0 +1,3 @@
loadModel(Modelica,{"3.2.1"});
simulate(Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a);

@@ -0,0 +1,2 @@
loadModel(Modelica,{"3.2.1"});
simulate(Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic);
@@ -0,0 +1,5 @@
loadModel(Modelica,{"3.2.1"});

setMatchingAlgorithm("PFPlus");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6, simflags="-iom kinsol", stopTime=0.1);
@@ -0,0 +1,4 @@
loadModel(Modelica,{"3.2.1"});
setMatchingAlgorithm("PFPlus");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic, simflags="-iom kinsol", stopTime=0.1);
@@ -0,0 +1,3 @@
loadModel(Modelica,{"3.2.1"}); getErrorString();
simulate(Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot, stopTime=1); getErrorString();

88 changes: 88 additions & 0 deletions testsuite/AVM/performance-avm.txt
@@ -0,0 +1,88 @@
Test Computer:
Elitebook 8440p Core-i7 @ 2.67Ghz 8Gb RAM

Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a.mos
3032 equation(s)
DYM: 06.6s
OMC: 27.6s (17.7s backend, 3.6 compile, 0.6s simulation)
-------------
4 x faster

Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic
3326 equation(s)
DYM: 07.3s
OMC: 70.1s (21.6s backend, 4.8 compile, 34.9 simulation)
-------------
10 x faster

Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot
4828 equation(s)
DYM: 7.91s
OMC: 186.01s (simulation crashes)
-----------------
23 x faster

Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6
12491 equation(s)
DYM: 19.1s
OMC: goes into an infinite loop in the back-end (17 sec flattening).
-----------------
? x faster

Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic
9491
DYM: 11.30s
OMC:
-----------------
? x faster





Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
487 equation(s)
DYM: 5.6s flatten,compile,simulate; 4.0s -> check model only
OMC: 5.4s -> check model only
-----------------------------
about the same (no simulation as OMC cannot do it yet)

Modelica.Fluid.Examples.DrumBoiler.DrumBoiler
142 equation(s)
DYM: 5.9s flatten,compile,simulate; 04.5s -> check model only
OMC: 17.2s -> check model only
-------------------------------
4 x faster (no simulation as OMC cannot do it yet)

Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
444 equation(s)
DYM: 6.5s flatten,compile,simulate; 04.3s -> check model only
OMC: 25.3s -> check model only
-------------------------------
6 x faster (no simulation as OMC cannot do it yet)






Modelica.Electrical.Analog.Examples.CharacteristicThyristors
50 equation(s)
DYM: 4.68s
OMC: 5.26s (0.16s backend, 1.22s compile, 0.077 simulation)
---------------
about the same

Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes
80 equation(s)
DYM: 4.8s
OMC: 5.38s (0.2s backend, 1.26s compile, 0.099s simulation)
----------------
about the same

Modelica.Electrical.Analog.Examples.CauerLowPassSC
559 equation(s)
DYM: 5.26s
OMC: 7.65s (0.79s backend, 2.01s compile, 0.46s simulation)
----------------
about the same
44 changes: 44 additions & 0 deletions testsuite/AVM/runAll.sh
@@ -0,0 +1,44 @@
#!/bin/sh

OMC='/c/bin/cygwin/home/adrpo/dev/OpenModelica/build/bin/omc.exe +locale=C +d=showStatement '

cd ./electrical

time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CauerLowPassSC.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CauerLowPassSC.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CharacteristicThyristors.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CharacteristicThyristors.mos
rm -f *.exe *.c *.h *.libs *.makefile *.mat *.o *.log *.xml

cd ../fluid

time ${OMC} omc_check_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.DrumBoiler.DrumBoiler.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.DrumBoiler.DrumBoiler.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.DrumBoiler.DrumBoiler.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.DrumBoiler.DrumBoiler.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
rm -f *.exe *.c *.h *.libs *.makefile *.mat *.o *.log *.xml

cd ../multibody

time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic.mos
#time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6.mos
#time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot.mos
rm -f *.exe *.c *.h *.libs *.makefile *.mat *.o *.log *.xml

1 change: 1 addition & 0 deletions testsuite/CMakeLists.txt
@@ -0,0 +1 @@
ADD_SUBDIRECTORY(mofiles)

0 comments on commit 83ebb9b

Please sign in to comment.