Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Using package Modelica with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo) Running command: "" <> buildModelFMU(Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController,fileNamePrefix="Modelica_trunk_cpp_Modelica_Clocked_Examples_SimpleControlledDrive_ClockedWithDiscreteTextbookController",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController,fileNamePrefix="Modelica_trunk_cpp_Modelica_Clocked_Examples_SimpleControlledDrive_ClockedWithDiscreteTextbookController",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001605/0.001606, allocations: 197.4 kB / 17.38 MB, free: 4.316 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.282/1.282, allocations: 226.5 MB / 244.7 MB, free: 8.176 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0007201/0.0007202, allocations: 97.89 kB / 296.7 MB, free: 6.887 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002244/0.0002245, allocations: 4 kB / 356.8 MB, free: 10.8 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2088/0.209, allocations: 51.29 MB / 408.1 MB, free: 27.68 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController): time 0.001736/0.2108, allocations: 1.68 MB / 409.8 MB, free: 26 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.0007519/0.2116, allocations: 0.4931 MB / 410.3 MB, free: 25.5 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001058/0.2117, allocations: 3.938 kB / 410.3 MB, free: 25.5 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 9.165e-05/0.2118, allocations: 13.61 kB / 410.3 MB, free: 25.48 MB / 298.7 MB Notification: Performance of NFTyping.typeBindings: time 5.809e-05/0.2119, allocations: 15.86 kB / 410.3 MB, free: 25.47 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002825/0.2122, allocations: 51.88 kB / 410.4 MB, free: 25.42 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.0001228/0.2123, allocations: 113.1 kB / 410.5 MB, free: 25.31 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001344/0.2124, allocations: 46.55 kB / 410.5 MB, free: 25.27 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 6.143e-05/0.2125, allocations: 40.44 kB / 410.6 MB, free: 25.23 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 6.339e-05/0.2126, allocations: 39.78 kB / 410.6 MB, free: 25.19 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 1.953e-05/0.2126, allocations: 5.25 kB / 410.6 MB, free: 25.18 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 1.658e-05/0.2126, allocations: 4 kB / 410.6 MB, free: 25.18 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 2.279e-05/0.2127, allocations: 19.92 kB / 410.6 MB, free: 25.16 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 5.457e-05/0.2127, allocations: 72.88 kB / 410.7 MB, free: 25.09 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 9.367e-05/0.2128, allocations: 85.03 kB / 410.8 MB, free: 25 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 5.941e-06/0.2128, allocations: 0 / 410.8 MB, free: 25 MB / 298.7 MB Notification: Performance of FrontEnd: time 1.713e-06/0.2128, allocations: 3.938 kB / 410.8 MB, free: 25 MB / 298.7 MB Notification: Performance of Transformations before backend: time 3.827e-06/0.2129, allocations: 0 / 410.8 MB, free: 25 MB / 298.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 30 * Number of variables: 30 Notification: Performance of Generate backend data structure: time 0.0004463/0.2133, allocations: 417.4 kB / 411.2 MB, free: 24.55 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.873e-05/0.2133, allocations: 8.031 kB / 411.2 MB, free: 24.54 MB / 298.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 3.724e-05/0.2134, allocations: 46.73 kB / 411.3 MB, free: 24.48 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 3.053e-05/0.2134, allocations: 20.69 kB / 411.3 MB, free: 24.46 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000151/0.2136, allocations: 200.1 kB / 411.5 MB, free: 24.23 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.137e-05/0.2136, allocations: 7.375 kB / 411.5 MB, free: 24.23 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 2.508e-05/0.2136, allocations: 16.38 kB / 411.5 MB, free: 24.21 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004014/0.214, allocations: 238.7 kB / 411.7 MB, free: 23.95 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.504e-05/0.2141, allocations: 4 kB / 411.7 MB, free: 23.95 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.277e-05/0.2141, allocations: 0 / 411.7 MB, free: 23.95 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.912e-06/0.2141, allocations: 4 kB / 411.7 MB, free: 23.95 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002245/0.2143, allocations: 103.9 kB / 411.8 MB, free: 23.84 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0004401/0.2148, allocations: 0.5881 MB / 412.4 MB, free: 23.18 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0002188/0.215, allocations: 155.9 kB / 412.6 MB, free: 23 MB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001318/0.2151, allocations: 78.62 kB / 412.7 MB, free: 22.92 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 2.45e-05/0.2152, allocations: 4 kB / 412.7 MB, free: 22.91 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 1.695e-05/0.2152, allocations: 42.56 kB / 412.7 MB, free: 22.86 MB / 298.7 MB Notification: Performance of pre-optimization done (n=14): time 1.833e-06/0.2152, allocations: 3.984 kB / 412.7 MB, free: 22.86 MB / 298.7 MB Notification: Performance of matching and sorting (n=14): time 0.0004464/0.2157, allocations: 197.4 kB / 412.9 MB, free: 22.66 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.031e-05/0.2157, allocations: 114.8 kB / 413 MB, free: 22.52 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 6.343e-05/0.2158, allocations: 133.1 kB / 413.1 MB, free: 22.38 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 1.014e-05/0.2158, allocations: 25.7 kB / 413.2 MB, free: 22.35 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 5.494e-05/0.2159, allocations: 115.9 kB / 413.3 MB, free: 22.23 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 1.987e-05/0.2159, allocations: 23.73 kB / 413.3 MB, free: 22.21 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 6.062e-06/0.2159, allocations: 4 kB / 413.3 MB, free: 22.21 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 4.245e-05/0.2159, allocations: 322.8 kB / 413.6 MB, free: 21.88 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001014/0.216, allocations: 44 kB / 413.7 MB, free: 21.84 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001187/0.2162, allocations: 131.3 kB / 413.8 MB, free: 21.67 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0002201/0.2164, allocations: 188.6 kB / 414 MB, free: 21.44 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.835e-06/0.2164, allocations: 4 kB / 414 MB, free: 21.43 MB / 298.7 MB Notification: Performance of matching and sorting (n=20) (initialization): time 0.0002976/0.2167, allocations: 201.5 kB / 414.2 MB, free: 21.23 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.357e-05/0.2167, allocations: 4.031 kB / 414.2 MB, free: 21.23 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.014e-06/0.2167, allocations: 11.94 kB / 414.2 MB, free: 21.21 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.711e-05/0.2168, allocations: 4 kB / 414.2 MB, free: 21.21 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001556/0.2169, allocations: 47.97 kB / 414.2 MB, free: 21.16 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.625e-06/0.2169, allocations: 11.88 kB / 414.3 MB, free: 21.15 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 8.878e-05/0.217, allocations: 19.84 kB / 414.3 MB, free: 21.13 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.047e-05/0.217, allocations: 12 kB / 414.3 MB, free: 21.12 MB / 298.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 15 * Number of states: 0 () * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 1 (PI.x) * Top-level inputs: 0 Notification: Strong component statistics for initialization (20): * Single equations (assignments): 20 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 7.048e-05/0.2171, allocations: 133.8 kB / 414.4 MB, free: 20.98 MB / 298.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001119/0.2172, allocations: 81.53 kB / 414.5 MB, free: 20.89 MB / 298.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 3.503e-05/0.2173, allocations: 16.66 kB / 414.5 MB, free: 20.87 MB / 298.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.106e-06/0.2173, allocations: 4 kB / 414.5 MB, free: 20.87 MB / 298.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.748e-06/0.2173, allocations: 0 / 414.5 MB, free: 20.87 MB / 298.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.216e-06/0.2173, allocations: 0 / 414.5 MB, free: 20.87 MB / 298.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001904/0.2175, allocations: 201.5 kB / 414.7 MB, free: 20.62 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.293e-06/0.2175, allocations: 4.469 kB / 414.7 MB, free: 20.62 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001557/0.2177, allocations: 39.97 kB / 414.8 MB, free: 20.58 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.813e-06/0.2177, allocations: 4 kB / 414.8 MB, free: 20.57 MB / 298.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.222e-05/0.2177, allocations: 7.938 kB / 414.8 MB, free: 20.57 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.674e-06/0.2177, allocations: 0 / 414.8 MB, free: 20.57 MB / 298.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.002e-06/0.2177, allocations: 3.938 kB / 414.8 MB, free: 20.56 MB / 298.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0004126/0.2181, allocations: 387.4 kB / 415.2 MB, free: 20.16 MB / 298.7 MB Notification: Performance of postOpt removeConstants (simulation): time 2.36e-05/0.2182, allocations: 89.05 kB / 415.2 MB, free: 20.06 MB / 298.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 1.932e-05/0.2182, allocations: 11.92 kB / 415.3 MB, free: 20.05 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000123/0.2183, allocations: 12.06 kB / 415.3 MB, free: 20.04 MB / 298.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 3.545e-05/0.2184, allocations: 7.984 kB / 415.3 MB, free: 20.03 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 6.823e-06/0.2184, allocations: 4 kB / 415.3 MB, free: 20.02 MB / 298.7 MB Notification: Performance of sorting global known variables: time 3.541e-05/0.2184, allocations: 95.27 kB / 415.4 MB, free: 19.93 MB / 298.7 MB Notification: Performance of sort global known variables: time 1e-07/0.2184, allocations: 0 / 415.4 MB, free: 19.93 MB / 298.7 MB Notification: Performance of remove unused functions: time 0.0002806/0.2187, allocations: 31.94 kB / 415.4 MB, free: 19.9 MB / 298.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 3 * Number of states: 2 (load.phi,load.w) * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 1 (PI.x) * Top-level inputs: 0 Notification: Strong component statistics for simulation (14): * Single equations (assignments): 14 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.000551/0.2193, allocations: 0.9271 MB / 416.3 MB, free: 18.95 MB / 298.7 MB Notification: Performance of simCode: created initialization part: time 0.0002688/0.2195, allocations: 124.6 kB / 416.4 MB, free: 18.82 MB / 298.7 MB Notification: Performance of simCode: created event and clocks part: time 1.953e-06/0.2196, allocations: 4.062 kB / 416.5 MB, free: 18.82 MB / 298.7 MB Notification: Performance of simCode: created simulation system equations: time 8.937e-05/0.2196, allocations: 35.91 kB / 416.5 MB, free: 18.79 MB / 298.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004633/0.2201, allocations: 56.73 kB / 416.5 MB, free: 18.73 MB / 298.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.00123/0.2214, allocations: 1.038 MB / 417.6 MB, free: 17.59 MB / 298.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001149/0.2215, allocations: 0.7084 MB / 418.3 MB, free: 16.86 MB / 298.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.03e-05/0.2216, allocations: 46.38 kB / 418.3 MB, free: 16.81 MB / 298.7 MB Notification: Performance of SimCode: time 2.11e-07/0.2216, allocations: 0 / 418.3 MB, free: 16.81 MB / 298.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 2.64/2.861, allocations: 1.861 MB / 420.2 MB, free: 14.96 MB / 298.7 MB (rm -f Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController.pipe ; mkfifo Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController.pipe ; head -c 1048576 < Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController.pipe >> ../files/Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController_res.mat --tempDir=temp_Modelica_trunk_cpp_Modelica_Clocked_Examples_SimpleControlledDrive_ClockedWithDiscreteTextbookController_fmu --startTime=0 --stopTime=5 --timeout=50 --tolerance=1e-06 Modelica_trunk_cpp_Modelica_Clocked_Examples_SimpleControlledDrive_ClockedWithDiscreteTextbookController.fmu > Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController.pipe 2>&1) diffSimulationResults("Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController_res.mat","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Clocked/Examples/SimpleControlledDrive/ClockedWithDiscreteTextbookController/ClockedWithDiscreteTextbookController.csv","../files/Modelica_trunk_cpp_Modelica.Clocked.Examples.SimpleControlledDrive.ClockedWithDiscreteTextbookController.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) "" Variables in the reference:time,load.phi,load.w,PI.x,PI.y Variables in the result:PI.Td,PI.kd,PI.u,PI.x,PI.y,der(load.phi),der(load.w),feedback.u1,feedback.u2,feedback.y,hold1.u,hold1.y,hold1.y_start,load.J,load.a,load.flange_a.phi,load.flange_a.tau,load.flange_b.phi,load.flange_b.tau,load.phi,load.stateSelect,load.w,periodicClock.period,periodicClock.useSolver,previous(PI.x),ramp.duration,ramp.height,ramp.offset,ramp.startTime,ramp.y,sample1.u,sample1.y,sample2.u,sample2.y,speed.flange.phi,speed.flange.tau,speed.w,time,torque.flange.phi,torque.flange.tau,torque.phi_support,torque.tau,torque.useSupport