Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr KeyWordIO_KeyWordIO.Examples.WriteRealVariables.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/KeyWordIO 0.12.0/package.mo", uses=false) Using package KeyWordIO with version 0.12.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/KeyWordIO 0.12.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(KeyWordIO.Examples.WriteRealVariables,fileNamePrefix="KeyWordIO_KeyWordIO_Examples_WriteRealVariables",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(KeyWordIO.Examples.WriteRealVariables,fileNamePrefix="KeyWordIO_KeyWordIO_Examples_WriteRealVariables",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.004704/0.004704, allocations: 95.77 kB / 15.73 MB, free: 6.039 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.001282/0.001282, allocations: 198.9 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.457/1.457, allocations: 222.9 MB / 240.4 MB, free: 4.332 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/KeyWordIO 0.12.0/package.mo): time 0.007268/0.007268, allocations: 1.008 MB / 291.6 MB, free: 1.176 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001933/0.001933, allocations: 59.91 kB / 402.5 MB, free: 4.5 MB / 334.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2198/0.2218, allocations: 49.65 MB / 452.1 MB, free: 22.05 MB / 350.1 MB Notification: Performance of NFInst.instantiate(KeyWordIO.Examples.WriteRealVariables): time 0.001957/0.2238, allocations: 1.364 MB / 453.5 MB, free: 21.11 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.0009423/0.2247, allocations: 0.8031 MB / 454.3 MB, free: 20.55 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 2.735e-05/0.2248, allocations: 0 / 454.3 MB, free: 20.55 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 2.779e-05/0.2248, allocations: 6.844 kB / 454.3 MB, free: 20.54 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001693/0.225, allocations: 11.94 kB / 454.3 MB, free: 20.53 MB / 350.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/KeyWordIO 0.12.0/writeRealVariables.mo:2:1-21:23:writable] Warning: Pure function 'KeyWordIO.writeRealVariables' contains a call to impure function 'Modelica.Utilities.Files.removeFile'. Notification: Performance of NFTyping.typeClassSections: time 0.0002177/0.2252, allocations: 45.72 kB / 454.4 MB, free: 20.51 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 7.529e-05/0.2253, allocations: 23.92 kB / 454.4 MB, free: 20.5 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 3.556e-05/0.2254, allocations: 6.953 kB / 454.4 MB, free: 20.5 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 3.092e-05/0.2254, allocations: 20.78 kB / 454.4 MB, free: 20.48 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 9.985e-05/0.2255, allocations: 10.39 kB / 454.4 MB, free: 20.48 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 1.026e-05/0.2255, allocations: 2.969 kB / 454.4 MB, free: 20.48 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001008/0.2256, allocations: 43.31 kB / 454.5 MB, free: 20.47 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 1.173e-05/0.2256, allocations: 4 kB / 454.5 MB, free: 20.46 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 2.646e-05/0.2257, allocations: 7.031 kB / 454.5 MB, free: 20.46 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.000133/0.2258, allocations: 68.72 kB / 454.6 MB, free: 20.44 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.026e-06/0.2258, allocations: 7.938 kB / 454.6 MB, free: 20.43 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.333e-06/0.2258, allocations: 0 / 454.6 MB, free: 20.43 MB / 350.1 MB Notification: Performance of Transformations before backend: time 4.348e-06/0.2258, allocations: 0 / 454.6 MB, free: 20.43 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: 3 * Number of variables: 3 Notification: Performance of Generate backend data structure: time 0.0003578/0.2262, allocations: 371.2 kB / 454.9 MB, free: 20.03 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.234e-05/0.2262, allocations: 11.38 kB / 454.9 MB, free: 20.03 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 2.03e-05/0.2263, allocations: 34.69 kB / 455 MB, free: 19.99 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 2.536e-05/0.2263, allocations: 11.73 kB / 455 MB, free: 19.98 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 8.507e-05/0.2264, allocations: 174.8 kB / 455.2 MB, free: 19.78 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.252e-05/0.2264, allocations: 8.359 kB / 455.2 MB, free: 19.77 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 1.169e-05/0.2264, allocations: 3.344 kB / 455.2 MB, free: 19.77 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0001105/0.2265, allocations: 47.33 kB / 455.2 MB, free: 19.73 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 9.137e-06/0.2265, allocations: 3.938 kB / 455.2 MB, free: 19.73 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.744e-06/0.2266, allocations: 0 / 455.2 MB, free: 19.73 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.007e-06/0.2266, allocations: 3.062 kB / 455.2 MB, free: 19.73 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 6.731e-05/0.2266, allocations: 19.33 kB / 455.2 MB, free: 19.72 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0001036/0.2267, allocations: 155.1 kB / 455.4 MB, free: 19.53 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 7.291e-05/0.2268, allocations: 43.39 kB / 455.4 MB, free: 19.49 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 4.485e-05/0.2269, allocations: 18.73 kB / 455.4 MB, free: 19.48 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.119e-05/0.2269, allocations: 3.031 kB / 455.5 MB, free: 19.48 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0001449/0.227, allocations: 143.2 kB / 455.6 MB, free: 19.33 MB / 350.1 MB Notification: Performance of pre-optimization done (n=5): time 1.272e-06/0.2271, allocations: 0 / 455.6 MB, free: 19.33 MB / 350.1 MB Notification: Performance of matching and sorting (n=5): time 0.0002604/0.2273, allocations: 128.8 kB / 455.7 MB, free: 19.25 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.197e-05/0.2274, allocations: 136.1 kB / 455.8 MB, free: 19.09 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 5.294e-05/0.2274, allocations: 112.4 kB / 456 MB, free: 18.98 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 7.013e-06/0.2274, allocations: 25.7 kB / 456 MB, free: 18.95 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 1.505e-05/0.2275, allocations: 86.92 kB / 456.1 MB, free: 18.86 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 1.996e-05/0.2275, allocations: 10.62 kB / 456.1 MB, free: 18.86 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.658e-05/0.2275, allocations: 16.47 kB / 456.1 MB, free: 18.84 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 3.477e-05/0.2275, allocations: 316.9 kB / 456.4 MB, free: 18.52 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 4.24e-05/0.2276, allocations: 20.53 kB / 456.4 MB, free: 18.51 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 4.187e-05/0.2276, allocations: 24.67 kB / 456.4 MB, free: 18.49 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0001144/0.2278, allocations: 97.34 kB / 456.5 MB, free: 18.4 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.533e-06/0.2278, allocations: 0 / 456.5 MB, free: 18.4 MB / 350.1 MB Notification: Performance of matching and sorting (n=6) (initialization): time 0.0001335/0.2279, allocations: 106.3 kB / 456.6 MB, free: 18.33 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.204e-05/0.2279, allocations: 43.98 kB / 456.7 MB, free: 18.29 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 3.847e-06/0.228, allocations: 0 / 456.7 MB, free: 18.29 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.106e-05/0.228, allocations: 0 / 456.7 MB, free: 18.29 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 5.743e-05/0.228, allocations: 9.438 kB / 456.7 MB, free: 18.29 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 4.349e-06/0.228, allocations: 0 / 456.7 MB, free: 18.29 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 3.741e-05/0.2281, allocations: 6.922 kB / 456.7 MB, free: 18.28 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.314e-06/0.2281, allocations: 2.969 kB / 456.7 MB, free: 18.28 MB / 350.1 MB Warning: Assuming fixed start value for the following 1 variables: y_end:DISCRETE(start = 0.0 fixed = true ) "End value of step.y right after switching" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 2 * Number of states: 0 () * Number of discrete variables: 5 ($PRE.y_end,y_end,y_start,$whenCondition2,$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (4): * Single equations (assignments): 3 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 9.075e-05/0.2282, allocations: 146.2 kB / 456.9 MB, free: 18.13 MB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 1.568e-05/0.2282, allocations: 15.56 kB / 456.9 MB, free: 18.12 MB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 1.499e-05/0.2282, allocations: 4.656 kB / 456.9 MB, free: 18.11 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.533e-06/0.2282, allocations: 0.8438 kB / 456.9 MB, free: 18.11 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.036e-06/0.2282, allocations: 0 / 456.9 MB, free: 18.11 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.074e-06/0.2283, allocations: 0.6562 kB / 456.9 MB, free: 18.11 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 6.725e-05/0.2283, allocations: 163.7 kB / 457 MB, free: 17.92 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.493e-06/0.2283, allocations: 7.938 kB / 457 MB, free: 17.91 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 2.592e-05/0.2284, allocations: 2.906 kB / 457 MB, free: 17.91 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.723e-06/0.2284, allocations: 4.469 kB / 457 MB, free: 17.91 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 9.858e-06/0.2284, allocations: 2.469 kB / 457.1 MB, free: 17.91 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.914e-06/0.2284, allocations: 8.594 kB / 457.1 MB, free: 17.91 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.01e-07/0.2284, allocations: 0 / 457.1 MB, free: 17.91 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0001789/0.2286, allocations: 158.5 kB / 457.2 MB, free: 17.78 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 1.609e-05/0.2286, allocations: 83.95 kB / 457.3 MB, free: 17.68 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 1.713e-05/0.2286, allocations: 3.062 kB / 457.3 MB, free: 17.68 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 3.356e-05/0.2287, allocations: 2.906 kB / 457.3 MB, free: 17.68 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 3.411e-05/0.2287, allocations: 2.953 kB / 457.3 MB, free: 17.68 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.194e-05/0.2287, allocations: 7 kB / 457.3 MB, free: 17.68 MB / 350.1 MB Notification: Performance of sorting global known variables: time 2.602e-05/0.2288, allocations: 91.33 kB / 457.4 MB, free: 17.6 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.21e-07/0.2288, allocations: 0 / 457.4 MB, free: 17.6 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0002087/0.229, allocations: 22.91 kB / 457.4 MB, free: 17.59 MB / 350.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 4 ($whenCondition1,$whenCondition2,y_start,y_end) * Number of discrete states: 4 ($whenCondition2,y_end,$whenCondition1,y_start) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (2): * Single equations (assignments): 1 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0006008/0.2296, allocations: 0.7958 MB / 458.2 MB, free: 16.9 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.0001666/0.2298, allocations: 97.48 kB / 458.3 MB, free: 16.83 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 1.593e-06/0.2298, allocations: 0 / 458.3 MB, free: 16.83 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 7.543e-05/0.2299, allocations: 95.2 kB / 458.4 MB, free: 16.75 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0001468/0.23, allocations: 5.875 kB / 458.4 MB, free: 16.75 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0008713/0.2309, allocations: 1.297 MB / 459.7 MB, free: 15.55 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 7.39e-05/0.231, allocations: 0.6818 MB / 460.4 MB, free: 14.85 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 1.818e-05/0.231, allocations: 6.328 kB / 460.4 MB, free: 14.85 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 2.584e-05/0.231, allocations: 11.44 kB / 460.4 MB, free: 14.84 MB / 350.1 MB Notification: Performance of SimCode: time 2.7e-07/0.231, allocations: 0 / 460.4 MB, free: 14.84 MB / 350.1 MB [/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/Compiler/SimCode/SimCodeMain.mo:787:13-787:114:writable] Error: Internal error Failed to copy path /home/hudson/saved_omc/libraries/.openmodelica/libraries/KeyWordIO 0.12.0/../output.txt to KeyWordIO_KeyWordIO_Examples_WriteRealVariables.fmutmp/resources//home/hudson/saved_omc/libraries/.openmodelica/libraries/KeyWordIO 0.12.0/.. Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02276/0.2538, allocations: 1.95 MB / 462.4 MB, free: 14.34 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.885/8.139, allocations: 10.41 kB / 462.4 MB, free: 14.34 MB / 350.1 MB (rm -f KeyWordIO_KeyWordIO.Examples.WriteRealVariables.pipe ; mkfifo KeyWordIO_KeyWordIO.Examples.WriteRealVariables.pipe ; head -c 1048576 < KeyWordIO_KeyWordIO.Examples.WriteRealVariables.pipe >> ../files/KeyWordIO_KeyWordIO.Examples.WriteRealVariables.sim & python3 -m fmpy simulate --output-file KeyWordIO_KeyWordIO.Examples.WriteRealVariables_res.csv --start-time 0 --stop-time 1 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.001 KeyWordIO_KeyWordIO_Examples_WriteRealVariables.fmu > KeyWordIO_KeyWordIO.Examples.WriteRealVariables.pipe 2>&1)