Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2.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) 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(Modelica.Mechanics.Rotational.Examples.LossyGearDemo2,fileNamePrefix="Modelica_4_0_0_Modelica_Mechanics_Rotational_Examples_LossyGearDemo2",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Mechanics.Rotational.Examples.LossyGearDemo2,fileNamePrefix="Modelica_4_0_0_Modelica_Mechanics_Rotational_Examples_LossyGearDemo2",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.001162/0.001162, allocations: 114.6 kB / 17.07 MB, free: 6.016 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.001107/0.001107, allocations: 191 kB / 18 MB, free: 5.098 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.279/1.279, allocations: 222.9 MB / 241.7 MB, free: 15.2 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001009/0.00101, allocations: 39.94 kB / 350.8 MB, free: 3.785 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2532/0.2542, allocations: 49.45 MB / 400.2 MB, free: 8.402 MB / 318.1 MB Notification: Performance of NFInst.instantiate(Modelica.Mechanics.Rotational.Examples.LossyGearDemo2): time 0.004013/0.2583, allocations: 2.737 MB / 403 MB, free: 6.07 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.001978/0.2603, allocations: 1.073 MB / 404 MB, free: 4.988 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002682/0.2606, allocations: 7.938 kB / 404 MB, free: 4.98 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002974/0.2609, allocations: 79.36 kB / 404.1 MB, free: 4.902 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0006971/0.2616, allocations: 190.9 kB / 404.3 MB, free: 4.715 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0005742/0.2622, allocations: 235.5 kB / 404.5 MB, free: 4.484 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0006432/0.2629, allocations: 0.6469 MB / 405.2 MB, free: 3.836 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002497/0.2631, allocations: 131.2 kB / 405.3 MB, free: 3.695 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0003823/0.2635, allocations: 299.1 kB / 405.6 MB, free: 3.402 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000412/0.264, allocations: 338.9 kB / 405.9 MB, free: 3.07 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 8.343e-05/0.264, allocations: 52 kB / 406 MB, free: 3.02 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002532/0.2643, allocations: 139.8 kB / 406.1 MB, free: 2.883 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001718/0.2645, allocations: 151.6 kB / 406.3 MB, free: 2.734 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002456/0.2647, allocations: 250.7 kB / 406.5 MB, free: 2.488 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0007717/0.2655, allocations: 0.649 MB / 407.2 MB, free: 1.84 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.949e-06/0.2655, allocations: 0 / 407.2 MB, free: 1.84 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.814e-06/0.2656, allocations: 0 / 407.2 MB, free: 1.84 MB / 318.1 MB Notification: Performance of Transformations before backend: time 9.258e-06/0.2656, allocations: 0 / 407.2 MB, free: 1.84 MB / 318.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 98 * Number of variables: 98 Notification: Performance of Generate backend data structure: time 0.001751/0.2673, allocations: 0.7987 MB / 408 MB, free: 0.9922 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.879e-05/0.2674, allocations: 12.03 kB / 408 MB, free: 0.9805 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001091/0.2675, allocations: 82.64 kB / 408.1 MB, free: 0.8906 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0003722/0.2679, allocations: 72.59 kB / 408.1 MB, free: 0.8203 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000656/0.2685, allocations: 366.6 kB / 408.5 MB, free: 436 kB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001368/0.2687, allocations: 96.95 kB / 408.6 MB, free: 328 kB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 8.508e-05/0.2688, allocations: 36.38 kB / 408.6 MB, free: 292 kB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.00103/0.2698, allocations: 0.5604 MB / 409.2 MB, free: 15.71 MB / 334.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.378e-05/0.2699, allocations: 7.875 kB / 409.2 MB, free: 15.7 MB / 334.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.777e-05/0.2699, allocations: 27.92 kB / 409.2 MB, free: 15.68 MB / 334.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.207e-06/0.2699, allocations: 8 kB / 409.2 MB, free: 15.67 MB / 334.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001247/0.2712, allocations: 0.6324 MB / 409.9 MB, free: 15.04 MB / 334.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002449/0.2737, allocations: 1.287 MB / 411.1 MB, free: 13.69 MB / 334.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.00121/0.2749, allocations: 0.545 MB / 411.7 MB, free: 13.13 MB / 334.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0006096/0.2755, allocations: 326.3 kB / 412 MB, free: 12.81 MB / 334.1 MB Notification: Performance of preOpt evalFunc (simulation): time 4.154e-05/0.2756, allocations: 8.547 kB / 412 MB, free: 12.8 MB / 334.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.951e-05/0.2756, allocations: 43.11 kB / 412.1 MB, free: 12.75 MB / 334.1 MB Notification: Performance of pre-optimization done (n=61): time 4.238e-06/0.2756, allocations: 4 kB / 412.1 MB, free: 12.75 MB / 334.1 MB Notification: Performance of matching and sorting (n=69): time 0.007178/0.2828, allocations: 2.876 MB / 414.9 MB, free: 9.75 MB / 334.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.488e-05/0.2829, allocations: 85.61 kB / 415 MB, free: 9.648 MB / 334.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004128/0.2833, allocations: 339 kB / 415.3 MB, free: 9.305 MB / 334.1 MB Notification: Performance of collectPreVariables (initialization): time 7.043e-05/0.2834, allocations: 41.7 kB / 415.4 MB, free: 9.258 MB / 334.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.000123/0.2835, allocations: 161.7 kB / 415.5 MB, free: 9.094 MB / 334.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.000192/0.2837, allocations: 234.1 kB / 415.8 MB, free: 8.863 MB / 334.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002154/0.284, allocations: 122.3 kB / 415.9 MB, free: 8.738 MB / 334.1 MB Notification: Performance of setup shared object (initialization): time 0.0001461/0.2841, allocations: 350.8 kB / 416.2 MB, free: 8.387 MB / 334.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006083/0.2847, allocations: 289.2 kB / 416.5 MB, free: 8.102 MB / 334.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006294/0.2854, allocations: 354.5 kB / 416.9 MB, free: 7.746 MB / 334.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001048/0.2864, allocations: 0.5226 MB / 417.4 MB, free: 7.219 MB / 334.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.519e-06/0.2865, allocations: 4 kB / 417.4 MB, free: 7.215 MB / 334.1 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.001682/0.2881, allocations: 0.8892 MB / 418.3 MB, free: 6.316 MB / 334.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.548e-05/0.2882, allocations: 11.94 kB / 418.3 MB, free: 6.305 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.738e-06/0.2882, allocations: 0 / 418.3 MB, free: 6.305 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.001069/0.2893, allocations: 478.4 kB / 418.8 MB, free: 5.836 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003736/0.2897, allocations: 87.88 kB / 418.8 MB, free: 5.75 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001271/0.2909, allocations: 1.076 MB / 419.9 MB, free: 4.648 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000475/0.2914, allocations: 51.94 kB / 420 MB, free: 4.598 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.594e-05/0.2915, allocations: 32.05 kB / 420 MB, free: 4.566 MB / 334.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 3 * Number of states: 0 () * Number of discrete variables: 15 (bearingFriction.free,gear.ideal,bearingFriction.mode,$PRE.bearingFriction.mode,bearingFriction.locked,bearingFriction.startBackward,$PRE.bearingFriction.startBackward,bearingFriction.startForward,$PRE.bearingFriction.startForward,gear.mode,$PRE.gear.mode,gear.locked,gear.startBackward,gear.startForward,gear.tau_aPos) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (46): * Single equations (assignments): 45 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(2,32)} Notification: Performance of prepare postOptimizeDAE: time 0.0002426/0.2917, allocations: 189.5 kB / 420.2 MB, free: 4.371 MB / 334.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001005/0.2919, allocations: 43.72 kB / 420.2 MB, free: 4.328 MB / 334.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0001284/0.292, allocations: 67.77 kB / 420.3 MB, free: 4.262 MB / 334.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.953e-06/0.292, allocations: 8 kB / 420.3 MB, free: 4.254 MB / 334.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.821e-06/0.292, allocations: 0 / 420.3 MB, free: 4.254 MB / 334.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.446e-06/0.292, allocations: 3.984 kB / 420.3 MB, free: 4.25 MB / 334.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003153/0.2952, allocations: 1.753 MB / 422.1 MB, free: 2.43 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.358e-06/0.2952, allocations: 4 kB / 422.1 MB, free: 2.426 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0003755/0.2956, allocations: 79.88 kB / 422.1 MB, free: 2.348 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.00093/0.2965, allocations: 456.9 kB / 422.6 MB, free: 1.898 MB / 334.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.898e-05/0.2966, allocations: 23.98 kB / 422.6 MB, free: 1.875 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.001187/0.2978, allocations: 1.029 MB / 423.6 MB, free: 0.8203 MB / 334.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.673e-06/0.2978, allocations: 0 / 423.6 MB, free: 0.8203 MB / 334.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002432/0.3002, allocations: 1.306 MB / 424.9 MB, free: 15.49 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002499/0.3005, allocations: 184.8 kB / 425.1 MB, free: 15.29 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 9.323e-05/0.3006, allocations: 16 kB / 425.1 MB, free: 15.27 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004362/0.3011, allocations: 56 kB / 425.2 MB, free: 15.22 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001848/0.3012, allocations: 84.42 kB / 425.3 MB, free: 15.14 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.547e-05/0.3013, allocations: 23.98 kB / 425.3 MB, free: 15.11 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0002729/0.3016, allocations: 241.9 kB / 425.5 MB, free: 14.88 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.5e-07/0.3016, allocations: 0 / 425.5 MB, free: 14.88 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0004824/0.3021, allocations: 151.9 kB / 425.7 MB, free: 14.73 MB / 350.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * Number of states: 2 (Inertia2.phi,Inertia2.w) * Number of discrete variables: 9 (gear.tau_aPos,gear.startForward,gear.startBackward,gear.locked,gear.mode,bearingFriction.startForward,bearingFriction.startBackward,bearingFriction.locked,bearingFriction.mode) * Number of discrete states: 4 (bearingFriction.mode,bearingFriction.startBackward,bearingFriction.startForward,gear.mode) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (39): * Single equations (assignments): 38 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(2,29)} Notification: Performance of Backend phase and start with SimCode phase: time 0.002818/0.3049, allocations: 1.897 MB / 427.6 MB, free: 12.8 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.001591/0.3065, allocations: 0.7118 MB / 428.3 MB, free: 12.08 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 3.246e-06/0.3065, allocations: 0 / 428.3 MB, free: 12.08 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0008389/0.3074, allocations: 396.2 kB / 428.7 MB, free: 11.7 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005442/0.3079, allocations: 57.05 kB / 428.7 MB, free: 11.63 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.008345/0.3163, allocations: 5.013 MB / 433.8 MB, free: 6.52 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003664/0.3167, allocations: 0.8212 MB / 434.6 MB, free: 5.672 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.000237/0.3169, allocations: 63.28 kB / 434.6 MB, free: 5.605 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002151/0.3172, allocations: 131.4 kB / 434.8 MB, free: 5.477 MB / 350.1 MB Notification: Performance of SimCode: time 6.21e-07/0.3172, allocations: 0 / 434.8 MB, free: 5.477 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.0351/0.3523, allocations: 13.78 MB / 448.5 MB, free: 7.867 MB / 366.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 12.03/12.38, allocations: 0 / 448.5 MB, free: 7.867 MB / 366.1 MB (rm -f Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2.pipe ; mkfifo Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2.pipe ; head -c 1048576 < Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2.pipe >> ../files/Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2.sim & python3 -m fmpy simulate --output-file Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.csv --start-time 0 --stop-time 0.5 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.001 Modelica_4_0_0_Modelica_Mechanics_Rotational_Examples_LossyGearDemo2.fmu > Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2.pipe 2>&1) diffSimulationResults("Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2_res.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Mechanics/Rotational/Examples/LossyGearDemo2/LossyGearDemo2.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Modelica_4.0.0_Modelica.Mechanics.Rotational.Examples.LossyGearDemo2.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches