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.001409/0.001409, allocations: 108 kB / 15.61 MB, free: 152 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001707/0.001707, allocations: 194.6 kB / 16.53 MB, free: 6.699 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.534/1.534, allocations: 222.9 MB / 240.2 MB, free: 4.379 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PlanarMechanics 1.6.0/package.mo): time 0.2434/0.2434, allocations: 9.11 MB / 299.5 MB, free: 1.781 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001281/0.001282, allocations: 59.91 kB / 362 MB, free: 12.9 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1588/0.1601, allocations: 51.44 MB / 413.5 MB, free: 9.422 MB / 350.1 MB Notification: Performance of NFInst.instantiate(PlanarMechanics.Examples.PistonEngine_DynamicStateSelection): time 0.2831/0.4432, allocations: 9.727 MB / 423.2 MB, free: 36.35 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.006545/0.4498, allocations: 2.842 MB / 426 MB, free: 36.31 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001525/0.4514, allocations: 40.38 kB / 426.1 MB, free: 36.31 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001069/0.4525, allocations: 422 kB / 426.5 MB, free: 36.31 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.004897/0.4575, allocations: 1.526 MB / 428 MB, free: 36 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0008457/0.4584, allocations: 184.1 kB / 428.2 MB, free: 35.99 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.003853/0.4622, allocations: 2.841 MB / 431 MB, free: 35.51 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001806/0.4641, allocations: 1.07 MB / 432.1 MB, free: 35.11 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001575/0.4657, allocations: 1.022 MB / 433.1 MB, free: 34.71 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001745/0.4674, allocations: 1.469 MB / 434.6 MB, free: 34.17 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0005283/0.468, allocations: 259.9 kB / 434.9 MB, free: 34.17 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.001809/0.4698, allocations: 0.86 MB / 435.7 MB, free: 34.03 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.001148/0.4709, allocations: 1.356 MB / 437.1 MB, free: 33.5 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.001532/0.4725, allocations: 1.761 MB / 438.8 MB, free: 32.22 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.005187/0.4777, allocations: 5.211 MB / 444 MB, free: 30.29 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 7.284e-06/0.4777, allocations: 3.281 kB / 444 MB, free: 30.29 MB / 350.1 MB Notification: Performance of FrontEnd: time 2.184e-06/0.4777, allocations: 0 / 444 MB, free: 30.29 MB / 350.1 MB Notification: Performance of Transformations before backend: time 0.0001547/0.4779, allocations: 0 / 444 MB, free: 30.29 MB / 350.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.01416/0.4921, allocations: 5.175 MB / 449.2 MB, free: 28.11 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 7.034e-05/0.4921, allocations: 9 kB / 449.2 MB, free: 28.11 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.001495/0.4937, allocations: 0.6048 MB / 449.8 MB, free: 27.85 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.007091/0.5008, allocations: 1.81 MB / 451.6 MB, free: 27.54 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0042/0.505, allocations: 1.509 MB / 453.2 MB, free: 26.61 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0002574/0.5053, allocations: 176 kB / 453.3 MB, free: 26.56 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.001199/0.5065, allocations: 230.8 kB / 453.6 MB, free: 26.51 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.01907/0.5256, allocations: 8.946 MB / 462.5 MB, free: 22.56 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 0.0001973/0.5258, allocations: 30.05 kB / 462.5 MB, free: 22.54 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.001058/0.5269, allocations: 108.9 kB / 462.6 MB, free: 22.5 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.004811/0.5317, allocations: 2.013 MB / 464.6 MB, free: 22.11 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.02439/0.5561, allocations: 7.969 MB / 472.6 MB, free: 19.44 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.05138/0.6076, allocations: 28.56 MB / 0.4894 GB, free: 10.73 MB / 366.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.008127/0.6158, allocations: 2.803 MB / 0.4922 GB, free: 7.816 MB / 366.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.002005/0.6178, allocations: 0.9863 MB / 0.4931 GB, free: 6.828 MB / 366.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.01143/0.6293, allocations: 6.481 MB / 0.4995 GB, free: 15.76 MB / 382.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.152e-05/0.6294, allocations: 47.81 kB / 0.4995 GB, free: 15.71 MB / 382.1 MB Notification: Performance of pre-optimization done (n=155): time 4.749e-06/0.6294, allocations: 0 / 0.4995 GB, free: 15.71 MB / 382.1 MB Notification: Performance of matching and sorting (n=197): time 0.02655/0.6559, allocations: 9.773 MB / 0.5091 GB, free: 5.84 MB / 382.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.009723/0.6657, allocations: 6.78 MB / 0.5157 GB, free: 14.76 MB / 398.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.006558/0.6723, allocations: 3.039 MB / 0.5186 GB, free: 11.71 MB / 398.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0004007/0.6727, allocations: 57.69 kB / 0.5187 GB, free: 11.64 MB / 398.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.002173/0.6749, allocations: 2.356 MB / 0.521 GB, free: 9.289 MB / 398.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.001305/0.6763, allocations: 0.7207 MB / 0.5217 GB, free: 8.574 MB / 398.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.002532/0.6788, allocations: 0.9473 MB / 0.5226 GB, free: 7.617 MB / 398.1 MB Notification: Performance of setup shared object (initialization): time 0.0001322/0.679, allocations: 305.1 kB / 0.5229 GB, free: 7.316 MB / 398.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.003064/0.682, allocations: 1.528 MB / 0.5244 GB, free: 5.781 MB / 398.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.004958/0.687, allocations: 4.118 MB / 0.5284 GB, free: 396 kB / 398.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.008321/0.6954, allocations: 6.073 MB / 0.5344 GB, free: 9.059 MB / 414.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 0.0001356/0.6955, allocations: 28 kB / 0.5344 GB, free: 9.031 MB / 414.1 MB Notification: Performance of matching and sorting (n=621) (initialization): time 0.01521/0.7108, allocations: 6.046 MB / 0.5403 GB, free: 2.977 MB / 414.1 MB Notification: Performance of prepare postOptimizeDAE: time 0.0001467/0.711, allocations: 44 kB / 0.5403 GB, free: 2.934 MB / 414.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 0.0002041/0.7112, allocations: 92.14 kB / 0.5404 GB, free: 2.844 MB / 414.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.001988/0.7132, allocations: 0.6292 MB / 0.541 GB, free: 2.207 MB / 414.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.003919/0.7171, allocations: 1.018 MB / 0.542 GB, free: 1.188 MB / 414.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.01209/0.7292, allocations: 9.267 MB / 0.5511 GB, free: 7.496 MB / 430.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.004507/0.7338, allocations: 243.9 kB / 0.5513 GB, free: 7.258 MB / 430.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.000911/0.7347, allocations: 283.8 kB / 0.5516 GB, free: 6.98 MB / 430.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.004155/0.7389, allocations: 1.732 MB / 0.5533 GB, free: 5.238 MB / 430.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0007861/0.7397, allocations: 268.5 kB / 0.5535 GB, free: 4.973 MB / 430.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.006002/0.7457, allocations: 2.885 MB / 0.5563 GB, free: 2.062 MB / 430.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 0.0001205/0.7459, allocations: 35.97 kB / 0.5564 GB, free: 2.027 MB / 430.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 2.345e-05/0.7459, allocations: 4 kB / 0.5564 GB, free: 2.023 MB / 430.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.26e-05/0.7459, allocations: 11.97 kB / 0.5564 GB, free: 2.012 MB / 430.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.01992/0.7659, allocations: 9.282 MB / 0.5655 GB, free: 8.602 MB / 446.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.873e-05/0.7659, allocations: 12 kB / 0.5655 GB, free: 8.59 MB / 446.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0008969/0.7668, allocations: 211.7 kB / 0.5657 GB, free: 8.383 MB / 446.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.001979/0.7688, allocations: 0.6347 MB / 0.5663 GB, free: 7.738 MB / 446.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0002162/0.7691, allocations: 42.41 kB / 0.5663 GB, free: 7.699 MB / 446.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.01271/0.7818, allocations: 9.367 MB / 0.5755 GB, free: 13.94 MB / 462.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 0.007836/0.7897, allocations: 5.939 MB / 0.5813 GB, free: 7.707 MB / 462.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.007817/0.7975, allocations: 4.195 MB / 0.5854 GB, free: 3.441 MB / 462.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.00105/0.7986, allocations: 341.7 kB / 0.5857 GB, free: 3.086 MB / 462.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0007704/0.7994, allocations: 32 kB / 0.5857 GB, free: 3.055 MB / 462.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001519/0.8009, allocations: 87.89 kB / 0.5858 GB, free: 2.969 MB / 462.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000383/0.8013, allocations: 135.7 kB / 0.5859 GB, free: 2.84 MB / 462.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001333/0.8015, allocations: 55.98 kB / 0.586 GB, free: 2.785 MB / 462.1 MB Notification: Performance of sorting global known variables: time 0.004513/0.806, allocations: 1.94 MB / 0.5879 GB, free: 0.8398 MB / 462.1 MB Notification: Performance of sort global known variables: time 4.21e-07/0.806, allocations: 0 / 0.5879 GB, free: 0.8398 MB / 462.1 MB Notification: Performance of remove unused functions: time 0.2773/1.083, allocations: 0.8942 MB / 0.5888 GB, free: 134.2 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.007681/1.091, allocations: 4.839 MB / 0.5935 GB, free: 133.4 MB / 462.1 MB Notification: Performance of simCode: created initialization part: time 0.01136/1.102, allocations: 5.672 MB / 0.599 GB, free: 132.9 MB / 462.1 MB Notification: Performance of simCode: created event and clocks part: time 1.124e-05/1.102, allocations: 3.344 kB / 0.599 GB, free: 132.9 MB / 462.1 MB Notification: Performance of simCode: created simulation system equations: time 0.002954/1.105, allocations: 1.669 MB / 0.6007 GB, free: 132.5 MB / 462.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.002795/1.108, allocations: 446.3 kB / 0.6011 GB, free: 132.4 MB / 462.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.06532/1.174, allocations: 37.16 MB / 0.6374 GB, free: 106.1 MB / 462.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.006822/1.18, allocations: 2.832 MB / 0.6402 GB, free: 104.9 MB / 462.1 MB Notification: Performance of simCode: alias equations: time 0.004705/1.185, allocations: 1.315 MB / 0.6414 GB, free: 104.8 MB / 462.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.003036/1.188, allocations: 1.467 MB / 0.6429 GB, free: 103.6 MB / 462.1 MB Notification: Performance of SimCode: time 1.403e-06/1.188, allocations: 2.297 kB / 0.6429 GB, free: 103.6 MB / 462.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.1703/1.359, allocations: 61.8 MB / 0.7032 GB, free: 53.76 MB / 462.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 14.54/15.9, allocations: 11.02 kB / 0.7032 GB, free: 53.75 MB / 462.1 MB (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)