Hudson logo

Failed

metamodelica_meta.ListReductionCodegen.mo (from (result.xml))

Failing for the past 1,595 builds (Since #9699 )

Stacktrace

Output mismatch (see stdout for details)

Standard Output

 + ListReductionCodegen                                                              ... equation mismatch [time: 2]

==== Log /tmp/omc-rtest-adrpo33/metamodelica/meta/ListReductionCodegen.mo_temp5035/log-ListReductionCodegen.mo
function ListReduction.f
  output String s = "
  ";
  protected String sList;
  protected String sArr;
  protected list<#Real> reals1 = List(#(1.0), #(2.0), #(3.0));
  protected list<#Real> reals2 = List(#(-3.0), #(-2.0), #(-1.0), #(0.0), #(1.0), #(2.0), #(3.0));
  protected Real[3] realsArr1 = {1.0, 2.0, 3.0};
  protected Real[7] realsArr2 = {-3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0};
  protected Real[3] realsArr3;
algorithm
  s := s + anyString(list(r for r in reals1));
  s := s + "
  ";
  s := s + anyString(listReverse(r for r in reals1));
  s := s + "
  ";
  s := s + anyString(listReverse(r for r in reals1));
  s := s + "
  ";
  s := s + anyString(list(r for r in reals1));
  s := s + "
  ";
  s := s + anyString(list(#(3.5 * unbox(r)) for r guard unbox(r) > 0.0 in reals2));
  s := s + "
  ";
  s := s + anyString(#(ListReduction.myMin(3.5 * unbox(r) for r guard abs(unbox(r)) < 3.0 in reals2)));
  s := s + "
  ";
  s := s + anyString(#(0.0));
  s := s + "
  ";
  realsArr3 := array(unbox(r) for r in reals1);
  s := s + "{" + realString(realsArr3[1]) + "," + realString(realsArr3[2]) + "," + realString(realsArr3[3]) + "," + "}";
  s := s + "
  ";
  s := s + anyString(#(min(unbox(r) for r in reals1)));
  s := s + "
  ";
  s := s + anyString(#(max(unbox(r) for r in reals1)));
  s := s + "
  ";
  s := s + anyString(#(realMax(1.5 * unbox(r) for r in reals1)));
  s := s + "
  ";
  s := s + anyString(#(sum(3.5 * unbox(r) for r guard unbox(r) > 0.0 in reals2)));
  s := s + "
  ";
  s := s + anyString(#(product(3.5 * unbox(r) for r guard unbox(r) > 0.0 in reals2)));
  s := s + "
  ";
  s := s + anyString(#(realMin(unbox(r) for r guard unbox(r) > 2.0 in reals1)));
  s := s + "
  ";
  sList := s;
  s := "
  ";
  s := s + anyString(list(#(r) for r in {realsArr1[1], realsArr1[2], realsArr1[3]}));
  s := s + "
  ";
  s := s + anyString(listReverse(#(r) for r in {realsArr1[1], realsArr1[2], realsArr1[3]}));
  s := s + "
  ";
  s := s + anyString(listReverse(#(r) for r in {realsArr1[1], realsArr1[2], realsArr1[3]}));
  s := s + "
  ";
  s := s + anyString(list(#(r) for r in {realsArr1[1], realsArr1[2], realsArr1[3]}));
  s := s + "
  ";
  s := s + anyString(list(#(3.5 * r) for r guard r > 0.0 in {realsArr2[1], realsArr2[2], realsArr2[3], realsArr2[4], realsArr2[5], realsArr2[6], realsArr2[7]}));
  s := s + "
  ";
  s := s + anyString(#(ListReduction.myMin(0.0, 0.0) + ListReduction.myMin(3.5 * r for r guard abs(r) < 3.0 in {realsArr2[1], realsArr2[2], realsArr2[3], realsArr2[4], realsArr2[5], realsArr2[6], realsArr2[7]})));
  s := s + "
  ";
  s := s + anyString(#(0.0));
  s := s + "
  ";
  realsArr3 := {realsArr1[1], realsArr1[2], realsArr1[3]};
  s := s + "{" + realString(realsArr3[1]) + "," + realString(realsArr3[2]) + "," + realString(realsArr3[3]) + "," + "}";
  s := s + "
  ";
  s := s + anyString(#(min({realsArr1[1], realsArr1[2], realsArr1[3]})));
  s := s + "
  ";
  s := s + anyString(#(max({realsArr1[1], realsArr1[2], realsArr1[3]})));
  s := s + "
  ";
  s := s + anyString(#(max(1.5 * realsArr1[3], max(1.5 * realsArr1[2], 1.5 * realsArr1[1]))));
  s := s + "
  ";
  s := s + anyString(#(sum(3.5 * r for r guard r > 0.0 in {realsArr2[1], realsArr2[2], realsArr2[3], realsArr2[4], realsArr2[5], realsArr2[6], realsArr2[7]})));
  s := s + "
  ";
  s := s + anyString(#(product(3.5 * r for r guard r > 0.0 in {realsArr2[1], realsArr2[2], realsArr2[3], realsArr2[4], realsArr2[5], realsArr2[6], realsArr2[7]})));
  s := s + "
  ";
  s := s + anyString(#(realMin(r for r guard r > 2.0 in {realsArr1[1], realsArr1[2], realsArr1[3]})));
  s := s + "
  ";
  sArr := s;
  assert(sList == sArr, "Reductions are different:
  Array:
  " + sArr + "
  List:
  " + sList + "
  ");
end ListReduction.f;

function ListReduction.myMin
  input Real r1;
  input Real r2;
  output Real r = min(r1, r2);
end ListReduction.myMin;

class ListReduction
  String s = "
  {1, 2, 3}
  {3, 2, 1}
  {3, 2, 1}
  {1, 2, 3}
  {3.5, 7, 10.5}
  -7
  0
  {1.0,2.0,3.0,}
  1
  3
  4.5
  21
  257.25
  3
  ";
end ListReduction;

Equation mismatch: diff says:
--- /tmp/omc-rtest-adrpo33/metamodelica/meta/ListReductionCodegen.mo_temp5035/equations-expected2019-05-16 22:04:52.182161200 +0200
+++ /tmp/omc-rtest-adrpo33/metamodelica/meta/ListReductionCodegen.mo_temp5035/equations-got2019-05-16 22:04:54.981136300 +0200
@@ -68,11 +68,11 @@
 s := s + "
 ";
 s := s + anyString(list(#(3.5 * r) for r guard r > 0.0 in {realsArr2[1], realsArr2[2], realsArr2[3], realsArr2[4], realsArr2[5], realsArr2[6], realsArr2[7]}));
 s := s + "
 ";
-s := s + anyString(#(ListReduction.myMin(3.5 * r for r guard abs(r) < 3.0 in {realsArr2[1], realsArr2[2], realsArr2[3], realsArr2[4], realsArr2[5], realsArr2[6], realsArr2[7]})));
+s := s + anyString(#(ListReduction.myMin(0.0, 0.0) + ListReduction.myMin(3.5 * r for r guard abs(r) < 3.0 in {realsArr2[1], realsArr2[2], realsArr2[3], realsArr2[4], realsArr2[5], realsArr2[6], realsArr2[7]})));
 s := s + "
 ";
 s := s + anyString(#(0.0));
 s := s + "
 ";

Equation mismatch: omc-diff says:
Line 73: Real 3.5 != 0.0
  eps: 0.000000, actual diff: 3.500000

== 1 out of 1 tests failed [metamodelica/meta/ListReductionCodegen.mo_temp5035, time: 3]

Powered by Hudson Open Source Continuous Integration Server from the Eclipse Foundation