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.01029/0.01029, allocations: 96.7 kB / 15.73 MB, free: 6.047 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.002689/0.002689, allocations: 196.9 kB / 16.67 MB, free: 5.973 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 2.195/2.195, allocations: 222.9 MB / 240.4 MB, free: 4.309 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PlanarMechanics 1.6.0/package.mo): time 0.3498/0.3498, allocations: 9.108 MB / 299.6 MB, free: 1.672 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002197/0.002197, allocations: 68.11 kB / 414.1 MB, free: 8.855 MB / 350.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.5633/0.5655, allocations: 51.43 MB / 465.6 MB, free: 17.72 MB / 350.1 MB Notification: Performance of NFInst.instantiate(PlanarMechanics.Examples.PistonEngine_DynamicStateSelection): time 0.02017/0.5857, allocations: 9.724 MB / 475.3 MB, free: 10.78 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.01298/0.5988, allocations: 2.842 MB / 478.1 MB, free: 8.84 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.004095/0.603, allocations: 40.41 kB / 478.2 MB, free: 8.836 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.003068/0.6062, allocations: 420.2 kB / 478.6 MB, free: 8.633 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.009121/0.6154, allocations: 1.584 MB / 480.2 MB, free: 7.711 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.00162/0.6171, allocations: 183.4 kB / 480.4 MB, free: 7.562 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.008044/0.6251, allocations: 2.862 MB / 483.2 MB, free: 5.902 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.003054/0.6283, allocations: 1.072 MB / 484.3 MB, free: 5.176 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.004079/0.6324, allocations: 1.033 MB / 485.3 MB, free: 4.566 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.004038/0.6365, allocations: 1.463 MB / 486.8 MB, free: 3.656 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 0.001232/0.6377, allocations: 259.1 kB / 487 MB, free: 3.656 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.003632/0.6414, allocations: 0.8537 MB / 487.9 MB, free: 3.324 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.003194/0.6446, allocations: 1.35 MB / 489.2 MB, free: 2.527 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.00501/0.6497, allocations: 1.761 MB / 491 MB, free: 1.156 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.01819/0.6679, allocations: 5.507 MB / 496.5 MB, free: 13.19 MB / 366.1 MB Notification: Performance of FrontEnd - DAE generated: time 1.413e-05/0.668, allocations: 0 / 496.5 MB, free: 13.19 MB / 366.1 MB Notification: Performance of FrontEnd: time 4.228e-06/0.6681, allocations: 0 / 496.5 MB, free: 13.19 MB / 366.1 MB Notification: Performance of Transformations before backend: time 0.0004254/0.6685, allocations: 3.984 kB / 496.5 MB, free: 13.18 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.02712/0.6956, allocations: 5.273 MB / 0.49 GB, free: 7.836 MB / 366.1 MB Notification: Performance of prepare preOptimizeDAE: time 8.526e-05/0.6957, allocations: 12.03 kB / 0.49 GB, free: 7.824 MB / 366.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.002648/0.6984, allocations: 0.601 MB / 0.4906 GB, free: 7.215 MB / 366.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.01304/0.7115, allocations: 1.831 MB / 0.4924 GB, free: 5.379 MB / 366.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.007109/0.7187, allocations: 1.522 MB / 0.4939 GB, free: 3.812 MB / 366.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0003494/0.7191, allocations: 176.3 kB / 0.4941 GB, free: 3.637 MB / 366.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.001617/0.7207, allocations: 235.7 kB / 0.4943 GB, free: 3.406 MB / 366.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.03233/0.753, allocations: 8.952 MB / 0.503 GB, free: 9.992 MB / 382.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 0.0003853/0.7535, allocations: 27.8 kB / 0.5031 GB, free: 9.965 MB / 382.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.002282/0.7559, allocations: 107.8 kB / 0.5032 GB, free: 9.859 MB / 382.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.006925/0.7628, allocations: 2.017 MB / 0.5051 GB, free: 7.84 MB / 382.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.03391/0.7968, allocations: 7.963 MB / 0.5129 GB, free: 15.86 MB / 398.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.07485/0.8718, allocations: 28.54 MB / 0.5408 GB, free: 2.723 MB / 414.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.01277/0.8846, allocations: 2.818 MB / 0.5435 GB, free: 15.79 MB / 430.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.002712/0.8874, allocations: 0.9857 MB / 0.5445 GB, free: 14.8 MB / 430.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.01823/0.9057, allocations: 6.475 MB / 0.5508 GB, free: 7.695 MB / 430.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 9.076e-05/0.9058, allocations: 47.88 kB / 0.5509 GB, free: 7.641 MB / 430.1 MB Notification: Performance of pre-optimization done (n=155): time 1.035e-05/0.9059, allocations: 0 / 0.5509 GB, free: 7.641 MB / 430.1 MB Notification: Performance of matching and sorting (n=197): time 0.04079/0.9467, allocations: 9.846 MB / 0.5605 GB, free: 13.7 MB / 446.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.01433/0.9611, allocations: 6.768 MB / 0.5671 GB, free: 6.605 MB / 446.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.008851/0.97, allocations: 3.036 MB / 0.5701 GB, free: 3.559 MB / 446.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0005515/0.9706, allocations: 53.7 kB / 0.5701 GB, free: 3.5 MB / 446.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.003122/0.9738, allocations: 2.454 MB / 0.5725 GB, free: 1.023 MB / 446.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.001376/0.9752, allocations: 0.7557 MB / 0.5732 GB, free: 268 kB / 446.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.002364/0.9776, allocations: 0.9492 MB / 0.5742 GB, free: 15.3 MB / 462.1 MB Notification: Performance of setup shared object (initialization): time 0.000148/0.9777, allocations: 305.1 kB / 0.5745 GB, free: 15 MB / 462.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.00438/0.9821, allocations: 1.532 MB / 0.576 GB, free: 13.46 MB / 462.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.007776/0.9899, allocations: 4.118 MB / 0.58 GB, free: 8.066 MB / 462.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.01258/1.003, allocations: 6.085 MB / 0.5859 GB, free: 0.7227 MB / 462.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 0.0001582/1.003, allocations: 28 kB / 0.5859 GB, free: 0.6953 MB / 462.1 MB Notification: Performance of matching and sorting (n=621) (initialization): time 0.5493/1.552, allocations: 6.047 MB / 0.5918 GB, free: 107.7 MB / 462.1 MB Notification: Performance of prepare postOptimizeDAE: time 0.0001637/1.552, allocations: 46.84 kB / 0.5919 GB, free: 107.7 MB / 462.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 0.0003172/1.553, allocations: 91.33 kB / 0.592 GB, free: 107.7 MB / 462.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.002991/1.556, allocations: 0.6171 MB / 0.5926 GB, free: 107.6 MB / 462.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.006679/1.562, allocations: 1.022 MB / 0.5936 GB, free: 107.5 MB / 462.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.01904/1.581, allocations: 9.271 MB / 0.6026 GB, free: 101.1 MB / 462.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.007308/1.589, allocations: 245.1 kB / 0.6029 GB, free: 101 MB / 462.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.001563/1.59, allocations: 281.3 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.006848/1.597, allocations: 1.727 MB / 0.6048 GB, free: 100.2 MB / 462.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.001166/1.599, allocations: 286.2 kB / 0.6051 GB, free: 100.2 MB / 462.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.009246/1.608, allocations: 2.882 MB / 0.6079 GB, free: 99.08 MB / 462.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 0.0001858/1.608, allocations: 30.33 kB / 0.6079 GB, free: 99.08 MB / 462.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 2.716e-05/1.608, allocations: 5.812 kB / 0.6079 GB, free: 99.08 MB / 462.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.758e-05/1.608, allocations: 12.95 kB / 0.608 GB, free: 99.08 MB / 462.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.03154/1.64, allocations: 9.21 MB / 0.6169 GB, free: 95.44 MB / 462.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.248e-05/1.64, allocations: 3.906 kB / 0.617 GB, free: 95.44 MB / 462.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.001424/1.641, allocations: 213.8 kB / 0.6172 GB, free: 95.41 MB / 462.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.002601/1.644, allocations: 0.6345 MB / 0.6178 GB, free: 95.27 MB / 462.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0002296/1.644, allocations: 38.3 kB / 0.6178 GB, free: 95.25 MB / 462.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.01638/1.66, allocations: 9.366 MB / 0.627 GB, free: 89.09 MB / 462.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 0.009504/1.67, allocations: 5.938 MB / 0.6328 GB, free: 83.93 MB / 462.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.009553/1.68, allocations: 4.203 MB / 0.6369 GB, free: 79.66 MB / 462.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.001651/1.681, allocations: 356.1 kB / 0.6372 GB, free: 79.29 MB / 462.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0006154/1.682, allocations: 39.98 kB / 0.6372 GB, free: 79.25 MB / 462.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001684/1.684, allocations: 87.97 kB / 0.6373 GB, free: 79.16 MB / 462.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0004857/1.684, allocations: 136.3 kB / 0.6375 GB, free: 79.04 MB / 462.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001809/1.684, allocations: 59.42 kB / 0.6375 GB, free: 78.98 MB / 462.1 MB Notification: Performance of sorting global known variables: time 0.004354/1.689, allocations: 1.944 MB / 0.6394 GB, free: 77.03 MB / 462.1 MB Notification: Performance of sort global known variables: time 7.02e-07/1.689, allocations: 4 kB / 0.6394 GB, free: 77.03 MB / 462.1 MB Notification: Performance of remove unused functions: time 0.008067/1.697, allocations: 0.8904 MB / 0.6403 GB, free: 76.14 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.008601/1.706, allocations: 4.858 MB / 0.645 GB, free: 71.22 MB / 462.1 MB Notification: Performance of simCode: created initialization part: time 0.01011/1.716, allocations: 4.172 MB / 0.6491 GB, free: 67.03 MB / 462.1 MB Notification: Performance of simCode: created event and clocks part: time 1.333e-05/1.716, allocations: 0 / 0.6491 GB, free: 67.03 MB / 462.1 MB Notification: Performance of simCode: created simulation system equations: time 0.003603/1.719, allocations: 1.667 MB / 0.6507 GB, free: 65.32 MB / 462.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.004367/1.724, allocations: 450.7 kB / 0.6512 GB, free: 64.89 MB / 462.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.09227/1.816, allocations: 33.54 MB / 0.6839 GB, free: 27.77 MB / 462.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.005562/1.822, allocations: 2.833 MB / 0.6867 GB, free: 24.9 MB / 462.1 MB Notification: Performance of simCode: alias equations: time 0.005673/1.828, allocations: 1.318 MB / 0.688 GB, free: 23.58 MB / 462.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.003788/1.831, allocations: 1.468 MB / 0.6894 GB, free: 22.11 MB / 462.1 MB Notification: Performance of SimCode: time 6.502e-06/1.831, allocations: 0 / 0.6894 GB, free: 22.11 MB / 462.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.1875/2.019, allocations: 59.01 MB / 0.747 GB, free: 11.38 MB / 0.4981 GB Notification: Performance of buildModelFMU: Generate platform static: time 75.96/77.98, allocations: 2.969 kB / 0.747 GB, free: 11.38 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)