Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr PlanarMechanics_PlanarMechanics.Examples.PistonEngine_DynamicStateSelection.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/PlanarMechanics 1.6.0/package.mo", uses=false) Using package PlanarMechanics with version 1.6.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/PlanarMechanics 1.6.0/package.mo) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: "" <> buildModelFMU(PlanarMechanics.Examples.PistonEngine_DynamicStateSelection,fileNamePrefix="PlanarMechanics_PlanarMechanics_Examples_PistonEngine_DynamicStateSelection",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(PlanarMechanics.Examples.PistonEngine_DynamicStateSelection,fileNamePrefix="PlanarMechanics_PlanarMechanics_Examples_PistonEngine_DynamicStateSelection",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.007281/0.007281, allocations: 96.31 kB / 15.73 MB, free: 6.043 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001868/0.001868, allocations: 195.8 kB / 16.68 MB, free: 5.969 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.443/1.443, allocations: 222.9 MB / 240.4 MB, free: 4.285 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PlanarMechanics 1.6.0/package.mo): time 0.1625/0.1625, allocations: 9.101 MB / 299.7 MB, free: 1.703 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001892/0.001892, allocations: 63.91 kB / 414.1 MB, free: 8.836 MB / 350.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2314/0.2333, allocations: 51.43 MB / 465.6 MB, free: 17.9 MB / 350.1 MB Notification: Performance of NFInst.instantiate(PlanarMechanics.Examples.PistonEngine_DynamicStateSelection): time 0.008468/0.2418, allocations: 9.727 MB / 475.3 MB, free: 10.96 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.005603/0.2474, allocations: 2.839 MB / 478.1 MB, free: 9.02 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001998/0.2494, allocations: 43.62 kB / 478.2 MB, free: 9.012 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001195/0.2507, allocations: 414 kB / 478.6 MB, free: 8.816 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.003925/0.2547, allocations: 1.534 MB / 480.1 MB, free: 7.797 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0006088/0.2553, allocations: 192 kB / 480.3 MB, free: 7.641 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.003355/0.2586, allocations: 2.85 MB / 483.2 MB, free: 5.992 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001218/0.2599, allocations: 1.072 MB / 484.2 MB, free: 5.266 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001241/0.2611, allocations: 1.027 MB / 485.3 MB, free: 4.66 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001534/0.2627, allocations: 1.463 MB / 486.7 MB, free: 3.75 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0004743/0.2632, allocations: 259.9 kB / 487 MB, free: 3.75 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.001485/0.2647, allocations: 0.8573 MB / 487.8 MB, free: 3.414 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0009852/0.2656, allocations: 1.354 MB / 489.2 MB, free: 2.613 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.001304/0.267, allocations: 1.766 MB / 491 MB, free: 1.238 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.006515/0.2735, allocations: 5.5 MB / 496.5 MB, free: 13.24 MB / 366.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.288e-06/0.2735, allocations: 4 kB / 496.5 MB, free: 13.24 MB / 366.1 MB Notification: Performance of FrontEnd: time 1.272e-06/0.2735, allocations: 0 / 496.5 MB, free: 13.24 MB / 366.1 MB Notification: Performance of Transformations before backend: time 0.0001412/0.2737, allocations: 0 / 496.5 MB, free: 13.24 MB / 366.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 1302 * Number of variables: 1302 Notification: Performance of Generate backend data structure: time 0.01314/0.2868, allocations: 5.265 MB / 0.49 GB, free: 7.898 MB / 366.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.907e-05/0.2869, allocations: 8.031 kB / 0.49 GB, free: 7.891 MB / 366.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0008663/0.2877, allocations: 0.6049 MB / 0.4906 GB, free: 7.277 MB / 366.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.007131/0.2949, allocations: 1.839 MB / 0.4924 GB, free: 5.434 MB / 366.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002799/0.2977, allocations: 1.53 MB / 0.4939 GB, free: 3.859 MB / 366.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001605/0.2979, allocations: 176.3 kB / 0.494 GB, free: 3.684 MB / 366.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0004919/0.2984, allocations: 227.8 kB / 0.4942 GB, free: 3.461 MB / 366.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0147/0.3131, allocations: 8.956 MB / 0.503 GB, free: 10.04 MB / 382.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 0.0001033/0.3132, allocations: 23.81 kB / 0.503 GB, free: 10.02 MB / 382.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0003375/0.3136, allocations: 111.8 kB / 0.5031 GB, free: 9.91 MB / 382.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.003443/0.317, allocations: 2.005 MB / 0.5051 GB, free: 7.902 MB / 382.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.01618/0.3332, allocations: 7.963 MB / 0.5128 GB, free: 15.92 MB / 398.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.04077/0.374, allocations: 28.55 MB / 0.5407 GB, free: 2.781 MB / 414.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.00736/0.3814, allocations: 2.822 MB / 0.5435 GB, free: 15.84 MB / 430.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001678/0.3831, allocations: 0.9857 MB / 0.5444 GB, free: 14.85 MB / 430.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.00954/0.3927, allocations: 6.468 MB / 0.5508 GB, free: 7.758 MB / 430.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.252e-05/0.3927, allocations: 55.8 kB / 0.5508 GB, free: 7.695 MB / 430.1 MB Notification: Performance of pre-optimization done (n=155): time 3.156e-06/0.3928, allocations: 0 / 0.5508 GB, free: 7.695 MB / 430.1 MB Notification: Performance of matching and sorting (n=197): time 0.02376/0.4165, allocations: 9.835 MB / 0.5604 GB, free: 13.76 MB / 446.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.009023/0.4256, allocations: 6.775 MB / 0.567 GB, free: 6.664 MB / 446.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.004815/0.4304, allocations: 3.04 MB / 0.57 GB, free: 3.613 MB / 446.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0002395/0.4307, allocations: 53.7 kB / 0.5701 GB, free: 3.555 MB / 446.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.001968/0.4327, allocations: 2.45 MB / 0.5724 GB, free: 1.082 MB / 446.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0008294/0.4335, allocations: 0.7634 MB / 0.5732 GB, free: 320 kB / 446.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.001398/0.4349, allocations: 0.9378 MB / 0.5741 GB, free: 15.36 MB / 462.1 MB Notification: Performance of setup shared object (initialization): time 0.0001385/0.4351, allocations: 308.9 kB / 0.5744 GB, free: 15.06 MB / 462.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.00263/0.4377, allocations: 1.536 MB / 0.5759 GB, free: 13.52 MB / 462.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.004792/0.4425, allocations: 4.11 MB / 0.5799 GB, free: 8.129 MB / 462.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.007818/0.4503, allocations: 6.089 MB / 0.5859 GB, free: 0.7812 MB / 462.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.042e-05/0.4504, allocations: 28 kB / 0.5859 GB, free: 0.7539 MB / 462.1 MB Notification: Performance of matching and sorting (n=621) (initialization): time 0.2016/0.652, allocations: 6.054 MB / 0.5918 GB, free: 107.8 MB / 462.1 MB Notification: Performance of prepare postOptimizeDAE: time 7.603e-05/0.6521, allocations: 44.42 kB / 0.5918 GB, free: 107.8 MB / 462.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 0.0001259/0.6523, allocations: 90 kB / 0.5919 GB, free: 107.8 MB / 462.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.001665/0.6539, allocations: 0.6161 MB / 0.5925 GB, free: 107.7 MB / 462.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.003473/0.6574, allocations: 1.025 MB / 0.5935 GB, free: 107.5 MB / 462.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.009522/0.667, allocations: 9.261 MB / 0.6026 GB, free: 101.2 MB / 462.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.003613/0.6706, allocations: 251.5 kB / 0.6028 GB, free: 101.1 MB / 462.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0005813/0.6712, allocations: 284.8 kB / 0.6031 GB, free: 101 MB / 462.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 410 * Number of states: 0 () * Number of discrete variables: 24 (revolutePiston.cylinderColor[3],revolutePiston.cylinderColor[2],revolutePiston.cylinderColor[1],bodyPiston.sphereColor[3],bodyPiston.sphereColor[2],bodyPiston.sphereColor[1],pistonRod.color[3],pistonRod.color[2],pistonRod.color[1],revoluteDisc.cylinderColor[3],revoluteDisc.cylinderColor[2],revoluteDisc.cylinderColor[1],prismatic.boxColor[3],prismatic.boxColor[2],prismatic.boxColor[1],fixedTranslationDisc.color[3],fixedTranslationDisc.color[2],fixedTranslationDisc.color[1],revoluteDrive.cylinderColor[3],revoluteDrive.cylinderColor[2],revoluteDrive.cylinderColor[1],bodyDrive.sphereColor[3],bodyDrive.sphereColor[2],bodyDrive.sphereColor[1]) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (554): * Single equations (assignments): 547 * Array equations: 4 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 3 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 2 systems {(3,21,88.9%), (1,9,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(1,9)} Notification: Performance of prepare postOptimizeDAE: time 0.002924/0.6742, allocations: 1.73 MB / 0.6048 GB, free: 100.2 MB / 462.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0004345/0.6746, allocations: 281.9 kB / 0.605 GB, free: 100.2 MB / 462.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.004715/0.6793, allocations: 2.877 MB / 0.6079 GB, free: 99.15 MB / 462.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 0.0001114/0.6795, allocations: 34.33 kB / 0.6079 GB, free: 99.15 MB / 462.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.226e-05/0.6795, allocations: 5.562 kB / 0.6079 GB, free: 99.15 MB / 462.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.501e-05/0.6795, allocations: 8.984 kB / 0.6079 GB, free: 99.15 MB / 462.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.01383/0.6933, allocations: 9.214 MB / 0.6169 GB, free: 95.51 MB / 462.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.003e-05/0.6934, allocations: 3.5 kB / 0.6169 GB, free: 95.51 MB / 462.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0007201/0.6941, allocations: 211.2 kB / 0.6171 GB, free: 95.49 MB / 462.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.001513/0.6956, allocations: 0.6351 MB / 0.6177 GB, free: 95.34 MB / 462.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 9.663e-05/0.6957, allocations: 42.95 kB / 0.6178 GB, free: 95.32 MB / 462.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.008284/0.704, allocations: 9.363 MB / 0.6269 GB, free: 89.02 MB / 462.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 0.005165/0.7092, allocations: 5.941 MB / 0.6327 GB, free: 83.91 MB / 462.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.005173/0.7144, allocations: 4.203 MB / 0.6368 GB, free: 79.64 MB / 462.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0007012/0.7152, allocations: 355.2 kB / 0.6372 GB, free: 79.27 MB / 462.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002906/0.7155, allocations: 35.98 kB / 0.6372 GB, free: 79.23 MB / 462.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0008916/0.7164, allocations: 83.91 kB / 0.6373 GB, free: 79.15 MB / 462.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002668/0.7166, allocations: 137.1 kB / 0.6374 GB, free: 79.02 MB / 462.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 9.386e-05/0.7167, allocations: 55.98 kB / 0.6375 GB, free: 78.96 MB / 462.1 MB Notification: Performance of sorting global known variables: time 0.002439/0.7192, allocations: 1.94 MB / 0.6393 GB, free: 77.02 MB / 462.1 MB Notification: Performance of sort global known variables: time 1.51e-07/0.7192, allocations: 4 kB / 0.6393 GB, free: 77.02 MB / 462.1 MB Notification: Performance of remove unused functions: time 0.003944/0.7231, allocations: 0.8884 MB / 0.6402 GB, free: 76.13 MB / 462.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 15 * Number of states: 2 ($STATESET2.x,$STATESET1.x) * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (125): * Single equations (assignments): 118 * Array equations: 4 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 3 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 2 systems {(3,17,88.9%), (2,11,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(2,17)} Notification: Performance of Backend phase and start with SimCode phase: time 0.005353/0.7285, allocations: 4.869 MB / 0.645 GB, free: 71.2 MB / 462.1 MB Notification: Performance of simCode: created initialization part: time 0.005865/0.7344, allocations: 4.166 MB / 0.649 GB, free: 67.02 MB / 462.1 MB Notification: Performance of simCode: created event and clocks part: time 8.135e-06/0.7344, allocations: 4.375 kB / 0.649 GB, free: 67.02 MB / 462.1 MB Notification: Performance of simCode: created simulation system equations: time 0.001989/0.7364, allocations: 1.667 MB / 0.6507 GB, free: 65.3 MB / 462.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.002273/0.7387, allocations: 445.6 kB / 0.6511 GB, free: 64.88 MB / 462.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.03488/0.7736, allocations: 33.56 MB / 0.6839 GB, free: 27.74 MB / 462.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.002352/0.776, allocations: 2.83 MB / 0.6866 GB, free: 24.88 MB / 462.1 MB Notification: Performance of simCode: alias equations: time 0.002548/0.7786, allocations: 1.318 MB / 0.6879 GB, free: 23.56 MB / 462.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.001461/0.78, allocations: 1.464 MB / 0.6893 GB, free: 22.09 MB / 462.1 MB Notification: Performance of SimCode: time 9.92e-07/0.78, allocations: 0 / 0.6893 GB, free: 22.09 MB / 462.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.1179/0.8979, allocations: 59.02 MB / 0.747 GB, free: 11.36 MB / 0.4981 GB Notification: Performance of buildModelFMU: Generate platform static: time 41.72/42.62, allocations: 0 / 0.747 GB, free: 11.36 MB / 0.4981 GB (rm -f PlanarMechanics_PlanarMechanics.Examples.PistonEngine_DynamicStateSelection.pipe ; mkfifo PlanarMechanics_PlanarMechanics.Examples.PistonEngine_DynamicStateSelection.pipe ; head -c 1048576 < PlanarMechanics_PlanarMechanics.Examples.PistonEngine_DynamicStateSelection.pipe >> ../files/PlanarMechanics_PlanarMechanics.Examples.PistonEngine_DynamicStateSelection.sim & python3 -m fmpy simulate --output-file PlanarMechanics_PlanarMechanics.Examples.PistonEngine_DynamicStateSelection_res.csv --start-time 0 --stop-time 10 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.004 PlanarMechanics_PlanarMechanics_Examples_PistonEngine_DynamicStateSelection.fmu > PlanarMechanics_PlanarMechanics.Examples.PistonEngine_DynamicStateSelection.pipe 2>&1)