Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr BuildingSystems_BuildingSystems.Utilities.Clustering.Validation.KMeans_1d.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/NcDataReader2 2.5.1-master/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo", uses=false) Using package BuildingSystems with version 2.0.0-beta (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo) Using package NcDataReader2 with version 2.5.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/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(BuildingSystems.Utilities.Clustering.Validation.KMeans_1d,fileNamePrefix="BuildingSystems_BuildingSystems_Utilities_Clustering_Validation_KMeans_1d",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(BuildingSystems.Utilities.Clustering.Validation.KMeans_1d,fileNamePrefix="BuildingSystems_BuildingSystems_Utilities_Clustering_Validation_KMeans_1d",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.004651/0.004651, allocations: 99.45 kB / 15.73 MB, free: 6.059 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.001382/0.001382, allocations: 193.8 kB / 16.67 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.289/1.289, allocations: 222.9 MB / 240.4 MB, free: 15.1 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002084/0.002084, allocations: 296.4 kB / 290.8 MB, free: 14.44 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.9328/0.9328, allocations: 169.3 MB / 0.4983 GB, free: 4.438 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001952/0.001952, allocations: 91.86 kB / 0.6809 GB, free: 7.488 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4256/0.4275, allocations: 86.98 MB / 0.7659 GB, free: 3.859 MB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Utilities.Clustering.Validation.KMeans_1d): time 0.001448/0.429, allocations: 0.5188 MB / 0.7664 GB, free: 3.344 MB / 0.5294 GB Notification: Performance of NFInst.instExpressions: time 0.00198/0.431, allocations: 1.6 MB / 0.7679 GB, free: 1.727 MB / 0.5294 GB Notification: Performance of NFInst.updateImplicitVariability: time 3.271e-05/0.4311, allocations: 4 kB / 0.7679 GB, free: 1.723 MB / 0.5294 GB Notification: Performance of NFTyping.typeComponents: time 0.0001337/0.4312, allocations: 19.92 kB / 0.768 GB, free: 1.703 MB / 0.5294 GB Notification: Performance of NFTyping.typeBindings: time 2.507e-05/0.4312, allocations: 7.984 kB / 0.768 GB, free: 1.695 MB / 0.5294 GB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/Math/Random.mo:1057:5-1146:31:writable] Warning: Pure function 'Modelica.Math.Random.Utilities.initializeImpureRandom' contains a call to impure function 'Modelica.Math.Random.Utilities.initializeImpureRandom.setInternalState'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Utilities/Clustering/KMeans.mo:96:7-96:35:writable] Warning: inertia was used before it was defined (given a value). Additional such uses may exist for the variable, but some messages were suppressed. Notification: Performance of NFTyping.typeClassSections: time 0.0008461/0.4321, allocations: 251.2 kB / 0.7682 GB, free: 1.449 MB / 0.5294 GB Notification: Performance of NFFlatten.flatten: time 6.226e-05/0.4322, allocations: 15.92 kB / 0.7682 GB, free: 1.434 MB / 0.5294 GB Notification: Performance of NFFlatten.resolveConnections: time 3.571e-05/0.4322, allocations: 4 kB / 0.7682 GB, free: 1.43 MB / 0.5294 GB Notification: Performance of NFEvalConstants.evaluate: time 3.165e-05/0.4323, allocations: 23.92 kB / 0.7683 GB, free: 1.406 MB / 0.5294 GB Notification: Performance of NFSimplifyModel.simplify: time 3.978e-05/0.4323, allocations: 19.91 kB / 0.7683 GB, free: 1.387 MB / 0.5294 GB Notification: Performance of NFPackage.collectConstants: time 1.102e-05/0.4323, allocations: 3.938 kB / 0.7683 GB, free: 1.383 MB / 0.5294 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0004957/0.4328, allocations: 327.5 kB / 0.7686 GB, free: 1.062 MB / 0.5294 GB Notification: Performance of NFScalarize.scalarize: time 4.678e-05/0.4329, allocations: 19.98 kB / 0.7686 GB, free: 1.043 MB / 0.5294 GB Notification: Performance of NFVerifyModel.verify: time 3.035e-05/0.4329, allocations: 19.8 kB / 0.7686 GB, free: 1.023 MB / 0.5294 GB Notification: Performance of NFConvertDAE.convert: time 0.0003542/0.4333, allocations: 284.3 kB / 0.7689 GB, free: 0.7539 MB / 0.5294 GB Notification: Performance of FrontEnd - DAE generated: time 3.176e-06/0.4333, allocations: 0 / 0.7689 GB, free: 0.7539 MB / 0.5294 GB Notification: Performance of FrontEnd: time 1.292e-06/0.4333, allocations: 0 / 0.7689 GB, free: 0.7539 MB / 0.5294 GB Notification: Performance of Transformations before backend: time 4.538e-06/0.4333, allocations: 0 / 0.7689 GB, free: 0.7539 MB / 0.5294 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 1 * Number of variables: 1 Notification: Performance of Generate backend data structure: time 0.0004011/0.4337, allocations: 418.7 kB / 0.7693 GB, free: 304 kB / 0.5294 GB Notification: Performance of prepare preOptimizeDAE: time 3.569e-05/0.4337, allocations: 8.031 kB / 0.7693 GB, free: 296 kB / 0.5294 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 2.858e-05/0.4338, allocations: 30.75 kB / 0.7693 GB, free: 256 kB / 0.5294 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 2.957e-05/0.4338, allocations: 12.89 kB / 0.7694 GB, free: 244 kB / 0.5294 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001458/0.434, allocations: 183.3 kB / 0.7695 GB, free: 24 kB / 0.5294 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.352e-06/0.434, allocations: 4.359 kB / 0.7695 GB, free: 20 kB / 0.5294 GB Notification: Performance of preOpt expandDerOperator (simulation): time 1.023e-05/0.434, allocations: 384 / 0.7695 GB, free: 20 kB / 0.5294 GB Notification: Performance of preOpt clockPartitioning (simulation): time 9.94e-05/0.4341, allocations: 45.77 kB / 0.7696 GB, free: 15.97 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 6.862e-06/0.4341, allocations: 0 / 0.7696 GB, free: 15.97 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.103e-06/0.4341, allocations: 4 kB / 0.7696 GB, free: 15.96 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 3.497e-06/0.4341, allocations: 0 / 0.7696 GB, free: 15.96 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 2.686e-05/0.4342, allocations: 19.98 kB / 0.7696 GB, free: 15.95 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0001532/0.4343, allocations: 169.7 kB / 0.7698 GB, free: 15.73 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 3.895e-05/0.4344, allocations: 22.58 kB / 0.7698 GB, free: 15.7 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 2.296e-05/0.4344, allocations: 16.91 kB / 0.7698 GB, free: 15.68 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 2.812e-05/0.4344, allocations: 7.938 kB / 0.7698 GB, free: 15.67 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.285e-05/0.4345, allocations: 38.5 kB / 0.7698 GB, free: 15.62 MB / 0.545 GB Notification: Performance of pre-optimization done (n=1): time 9.92e-07/0.4345, allocations: 0 / 0.7698 GB, free: 15.62 MB / 0.545 GB Notification: Performance of matching and sorting (n=1): time 0.0001398/0.4346, allocations: 65.62 kB / 0.7699 GB, free: 15.55 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 2.859e-05/0.4347, allocations: 51.41 kB / 0.77 GB, free: 15.49 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001404/0.4348, allocations: 174.1 kB / 0.7701 GB, free: 15.31 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 1.151e-05/0.4348, allocations: 25.7 kB / 0.7701 GB, free: 15.28 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 4.949e-05/0.4349, allocations: 100.1 kB / 0.7702 GB, free: 15.18 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 9.027e-06/0.4349, allocations: 0 / 0.7702 GB, free: 15.18 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 4.261e-05/0.4349, allocations: 29.83 kB / 0.7703 GB, free: 15.14 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 9.065e-05/0.435, allocations: 318.8 kB / 0.7706 GB, free: 14.82 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 5.103e-05/0.4351, allocations: 35.98 kB / 0.7706 GB, free: 14.79 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 4.18e-05/0.4351, allocations: 47.91 kB / 0.7707 GB, free: 14.74 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 7.537e-05/0.4352, allocations: 68.88 kB / 0.7707 GB, free: 14.67 MB / 0.545 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.653e-06/0.4352, allocations: 4 kB / 0.7707 GB, free: 14.66 MB / 0.545 GB Notification: Performance of matching and sorting (n=12) (initialization): time 0.0001479/0.4354, allocations: 129.5 kB / 0.7708 GB, free: 14.53 MB / 0.545 GB Notification: Performance of prepare postOptimizeDAE: time 1.222e-05/0.4354, allocations: 4 kB / 0.7708 GB, free: 14.53 MB / 0.545 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.482e-05/0.4354, allocations: 8.062 kB / 0.7709 GB, free: 14.52 MB / 0.545 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.344e-05/0.4354, allocations: 0 / 0.7709 GB, free: 14.52 MB / 0.545 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 1.189e-05/0.4355, allocations: 3.938 kB / 0.7709 GB, free: 14.52 MB / 0.545 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 5.501e-06/0.4355, allocations: 0 / 0.7709 GB, free: 14.52 MB / 0.545 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 2.784e-05/0.4355, allocations: 23.81 kB / 0.7709 GB, free: 14.49 MB / 0.545 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.765e-06/0.4355, allocations: 0 / 0.7709 GB, free: 14.49 MB / 0.545 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 9 (cluster_size[3],cluster_size[2],cluster_size[1],labels[5],labels[4],labels[3],labels[2],labels[1],cmp) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (2): * Single equations (assignments): 1 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 1 * 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 0.0001401/0.4357, allocations: 128.3 kB / 0.771 GB, free: 14.36 MB / 0.545 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 1.281e-05/0.4357, allocations: 7.891 kB / 0.771 GB, free: 14.35 MB / 0.545 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.756e-05/0.4358, allocations: 61.56 kB / 0.7711 GB, free: 14.29 MB / 0.545 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.452e-06/0.4358, allocations: 0 / 0.7711 GB, free: 14.29 MB / 0.545 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.486e-06/0.4358, allocations: 0 / 0.7711 GB, free: 14.29 MB / 0.545 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.893e-06/0.4358, allocations: 0 / 0.7711 GB, free: 14.29 MB / 0.545 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001046/0.4359, allocations: 173.7 kB / 0.7712 GB, free: 14.07 MB / 0.545 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 8.82e-07/0.4359, allocations: 0 / 0.7712 GB, free: 14.07 MB / 0.545 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 6.071e-06/0.4359, allocations: 3.938 kB / 0.7712 GB, free: 14.06 MB / 0.545 GB Notification: Performance of postOpt tearingSystem (simulation): time 1.573e-06/0.4359, allocations: 0 / 0.7712 GB, free: 14.06 MB / 0.545 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.869e-06/0.4359, allocations: 0 / 0.7712 GB, free: 14.06 MB / 0.545 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 8.72e-07/0.436, allocations: 0 / 0.7712 GB, free: 14.06 MB / 0.545 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.204e-06/0.436, allocations: 4 kB / 0.7712 GB, free: 14.06 MB / 0.545 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 7.86e-05/0.436, allocations: 85.03 kB / 0.7713 GB, free: 13.96 MB / 0.545 GB Notification: Performance of postOpt removeConstants (simulation): time 3.773e-05/0.4361, allocations: 89 kB / 0.7714 GB, free: 13.85 MB / 0.545 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 1.229e-05/0.4361, allocations: 0 / 0.7714 GB, free: 13.85 MB / 0.545 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 1.373e-05/0.4361, allocations: 4 kB / 0.7714 GB, free: 13.85 MB / 0.545 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 1.336e-05/0.4361, allocations: 0 / 0.7714 GB, free: 13.85 MB / 0.545 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.254e-06/0.4361, allocations: 3.938 kB / 0.7714 GB, free: 13.84 MB / 0.545 GB Notification: Performance of sorting global known variables: time 7.811e-05/0.4362, allocations: 125.3 kB / 0.7715 GB, free: 13.72 MB / 0.545 GB Notification: Performance of sort global known variables: time 1.41e-07/0.4362, allocations: 4.031 kB / 0.7715 GB, free: 13.72 MB / 0.545 GB Notification: Performance of remove unused functions: time 0.0003174/0.4366, allocations: 87.8 kB / 0.7716 GB, free: 13.63 MB / 0.545 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 1 (cmp) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (1): * Single equations (assignments): 1 * Array equations: 0 * Algorithm blocks: 0 * 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.0006622/0.4372, allocations: 0.7463 MB / 0.7724 GB, free: 12.88 MB / 0.545 GB Notification: Performance of simCode: created initialization part: time 0.0001574/0.4374, allocations: 105.7 kB / 0.7725 GB, free: 12.77 MB / 0.545 GB Notification: Performance of simCode: created event and clocks part: time 1.953e-06/0.4374, allocations: 0 / 0.7725 GB, free: 12.77 MB / 0.545 GB Notification: Performance of simCode: created simulation system equations: time 1.535e-05/0.4374, allocations: 8 kB / 0.7725 GB, free: 12.77 MB / 0.545 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0001403/0.4376, allocations: 6.75 kB / 0.7725 GB, free: 12.76 MB / 0.545 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001209/0.4388, allocations: 1.527 MB / 0.774 GB, free: 11.15 MB / 0.545 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002105/0.439, allocations: 0.6961 MB / 0.7746 GB, free: 10.43 MB / 0.545 GB Notification: Performance of simCode: alias equations: time 1.929e-05/0.439, allocations: 4.031 kB / 0.7746 GB, free: 10.43 MB / 0.545 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 3.716e-05/0.4391, allocations: 31.36 kB / 0.7747 GB, free: 10.39 MB / 0.545 GB Notification: Performance of SimCode: time 2.51e-07/0.4391, allocations: 0 / 0.7747 GB, free: 10.39 MB / 0.545 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02003/0.4591, allocations: 3.495 MB / 0.7781 GB, free: 7.02 MB / 0.545 GB Notification: Performance of buildModelFMU: Generate platform static: time 7.362/7.821, allocations: 8.625 kB / 0.7781 GB, free: 7.012 MB / 0.545 GB (rm -f BuildingSystems_BuildingSystems.Utilities.Clustering.Validation.KMeans_1d.pipe ; mkfifo BuildingSystems_BuildingSystems.Utilities.Clustering.Validation.KMeans_1d.pipe ; head -c 1048576 < BuildingSystems_BuildingSystems.Utilities.Clustering.Validation.KMeans_1d.pipe >> ../files/BuildingSystems_BuildingSystems.Utilities.Clustering.Validation.KMeans_1d.sim & python3 -m fmpy simulate --output-file BuildingSystems_BuildingSystems.Utilities.Clustering.Validation.KMeans_1d_res.csv --start-time 0 --stop-time 1 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.0004 BuildingSystems_BuildingSystems_Utilities_Clustering_Validation_KMeans_1d.fmu > BuildingSystems_BuildingSystems.Utilities.Clustering.Validation.KMeans_1d.pipe 2>&1)