Hudson logo

Failed

simulation_modelica_others.Random.mos (from (result.xml))

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

Stacktrace

Output mismatch (see stdout for details)

Standard Output

 + Random.mos                                                                        ... equation mismatch [time: 28]

==== Log /tmp/omc-rtest-adrpo33/simulation/modelica/others/Random.mos_temp3229/log-Random.mos
true
true
""
true



true
"function Modelica.Utilities.Streams.print \"Print string to terminal or file\"
  input String string = \"\" \"String to be printed\";
  input String fileName = \"\" \"File where to print (empty string is the terminal)\";

  external \"C\" myPuts(string, fileName);
end Modelica.Utilities.Streams.print;

function random \"Pseudo random number generator\"
  input Integer[3] seedIn \"Seed from last call\";
  output Real x \"Random number between 0 and 1\";
  output Integer[3] seedOut \"Modified seed for next call\";
algorithm
  seedOut[1] := 171 * seedIn[1] + -30269 * div(171 * seedIn[1], 30269);
  seedOut[2] := 172 * seedIn[2] + -30307 * div(172 * seedIn[2], 30307);
  seedOut[3] := 170 * seedIn[3] + -30323 * div(170 * seedIn[3], 30323);
  for i in 1:3 loop
    if seedOut[i] == 0 then
      seedOut[i] := 1;
    end if;
  end for;
  x := 3.303710066404573e-005 * /*Real*/(seedOut[1]) + 3.299567756623883e-005 * /*Real*/(seedOut[2]) + 3.297826732183491e-005 * /*Real*/(seedOut[3]) - div(3.303710066404573e-005 * /*Real*/(seedOut[1]) + 3.299567756623883e-005 * /*Real*/(seedOut[2]) + 3.297826732183491e-005 * /*Real*/(seedOut[3]), 1.0);
end random;

function testRandom3
  input Integer[3] seed_start = {23, 87, 187};
  output Real x;
  protected Integer[3] seed = {seed_start[1], seed_start[2], seed_start[3]};
algorithm
  Modelica.Utilities.Streams.print(\"See if seed_start is OK
  \", \"\");
  Modelica.Utilities.Streams.print(\"seed_start[1] = \" + String(seed_start[1], 0, true) + \"
  \", \"\");
  Modelica.Utilities.Streams.print(\"seed_start[2] = \" + String(seed_start[2], 0, true) + \"
  \", \"\");
  Modelica.Utilities.Streams.print(\"seed_start[3] = \" + String(seed_start[3], 0, true) + \"
  \", \"\");
  Modelica.Utilities.Streams.print(\"See if seed is set from seed_start
  \", \"\");
  Modelica.Utilities.Streams.print(\"seed[1] = \" + String(seed[1], 0, true) + \"
  \", \"\");
  Modelica.Utilities.Streams.print(\"seed[2] = \" + String(seed[2], 0, true) + \"
  \", \"\");
  Modelica.Utilities.Streams.print(\"seed[3] = \" + String(seed[3], 0, true) + \"
  \", \"\");
  for i in 1:10 loop
    (x, seed) := random({seed[1], seed[2], seed[3]});
    Modelica.Utilities.Streams.print(\"x = \" + String(x, 16, 0, true) + \"
    \", \"\");
  end for;
end testRandom3;

class testRandom2
  parameter Integer seed_start[1] = 23;
  parameter Integer seed_start[2] = 87;
  parameter Integer seed_start[3] = 187;
  Integer seed[1](start = seed_start[1], fixed = true);
  Integer seed[2](start = seed_start[2], fixed = true);
  Integer seed[3](start = seed_start[3], fixed = true);
  parameter Real y = testRandom3({seed_start[1], seed_start[2], seed_start[3]});
  Real x;
algorithm
  when sample(0.0, 0.2) then
    (x, seed) := random({pre(seed[1]), pre(seed[2]), pre(seed[3])});
    Modelica.Utilities.Streams.print(\"time = \" + String(time, \".1f\") + \", x = \" + String(x, \".6f\") + \"
    \", \"\");
  end when;
end testRandom2;
"
"Error: Error building simulator. Build log: gcc  -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse   -I"C:/dev/hudson/workspace/OM_Win/OM/build/include/omc/c"  -c -o testRandom1.o testRandom1.c
gcc  -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse   -I"C:/dev/hudson/workspace/OM_Win/OM/build/include/omc/c"  -c -o testRandom1_records.o testRandom1_records.c
g++ -shared -Xlinker --export-all-symbols -fPIC -o testRandom1.dll testRandom1.o testRandom1_records.o   -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse   -I"C:/dev/hudson/workspace/OM_Win/OM/build/include/omc/c"  -L"C:/dev/hudson/workspace/OM_Win/OM/build/lib//omc" -Wl,--stack,16777216,-rpath,'C:/dev/hudson/workspace/OM_Win/OM/build/lib//omc'   -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic  -lOpenModelicaRuntimeC -Wl,-Bstatic -lomcgc -lregex -ltre -lintl -liconv -lexpat -static-libgcc -luuid -loleaut32 -lole32 -limagehlp -lws2_32 -llis -lumfpack -lklu -lcolamd -lbtf -lamd  -lsundials_idas -lsundials_kinsol -lsundials_nvecserial -lipopt -lcoinmumps -lpthread -lm -lgfortranbegin -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lopenblas -lcminpack -Wl,-Bdynamic -lm
C:/dev/hudson/workspace/OM_Win/OM/build/lib//omc/libOpenModelicaRuntimeC.a(base_array.o):base_array.c:(.rdata$.refptr.omc_assert[.refptr.omc_assert]+0x0): undefined reference to `omc_assert'
C:/dev/hudson/workspace/OM_Win/OM/build/lib//omc/libOpenModelicaRuntimeC.a(omc_gc.o):omc_gc.c:(.rdata$.refptr.omc_assert_warning[.refptr.omc_assert_warning]+0x0): undefined reference to `omc_assert_warning'
collect2.exe: error: ld returned 1 exit status
testRandom1.makefile:20: recipe for target 'testRandom1' failed
make: *** [testRandom1] Error 1
RESULT: 2
"
record SimulationResult
    resultFile = "testRandom2_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 3.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'testRandom2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
    messages = "See if seed_start is OK
seed_start[1] = 23
seed_start[2] = 87
seed_start[3] = 187
See if seed is set from seed_start
seed[1] = 23
seed[2] = 87
seed[3] = 187
x = 0.6720613541740216
x = 0.3678597646977235
x = 0.6041085613242592
x = 0.1667374195729037
x = 0.4629589578171097
x = 0.9289893342375366
x = 0.653192131612639
x = 0.5926293930235835
x = 0.5294703487946859
x = 0.7684225743864568
LOG_SUCCESS       | info    | The initialization finished successfully without homotopy method.
time = 0.0, x = 0.672061
time = 0.2, x = 0.367860
time = 0.4, x = 0.604109
time = 0.6, x = 0.166737
time = 0.8, x = 0.462959
time = 1.0, x = 0.928989
time = 1.2, x = 0.653192
time = 1.4, x = 0.592629
time = 1.6, x = 0.529470
time = 1.8, x = 0.768423
time = 2.0, x = 0.673137
time = 2.2, x = 0.677167
time = 2.4, x = 0.042806
time = 2.6, x = 0.064589
time = 2.8, x = 0.674971
time = 3.0, x = 0.180925
LOG_SUCCESS       | info    | The simulation finished successfully.
"
end SimulationResult;
"Warning: The initial conditions are not fully specified. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization").
"

Equation mismatch: diff says:
--- /tmp/omc-rtest-adrpo33/simulation/modelica/others/Random.mos_temp3229/equations-expected2019-05-16 21:06:03.262895900 +0200
+++ /tmp/omc-rtest-adrpo33/simulation/modelica/others/Random.mos_temp3229/equations-got2019-05-16 21:06:31.521968900 +0200
@@ -1,66 +1,12 @@
 true
 true
 ""
 true
-See if seed_start is OK
-seed_start[1] = 5
-seed_start[2] = 6
-seed_start[3] = 13
-See if seed is set from seed_start
-seed[1] = 5
-seed[2] = 6
-seed[3] = 13
-x = 0.1351802310973727
-x = 0.0769890861178375
-x = 0.6320634440543995
-x = 0.1746304784651731
-x = 0.2261487421133119
-x = 0.5822825403329426
-x = 0.8685325299092261
-x = 0.3247009996034562
-x = 0.1539904247592703
-x = 0.9668480139584235
-0.9668480139584235
-See if seed_start is OK
-seed_start[1] = 6
-seed_start[2] = 7
-seed_start[3] = 2
-See if seed is set from seed_start
-seed[1] = 6
-seed[2] = 7
-seed[3] = 2
-x = 0.08483547196048634
-x = 0.5353798901434894
-x = 0.4768262391718506
-x = 0.7703588380462376
-x = 0.9086443360920617
-x = 0.9854621425896031
-x = 0.4482131888968541
-x = 0.2495274098011122
-x = 0.981638535344608
-x = 0.4101378849580573
-0.4101378849580573
-See if seed_start is OK
-seed_start[1] = 33
-seed_start[2] = 21
-seed_start[3] = 17
-See if seed is set from seed_start
-seed[1] = 33
-seed[2] = 21
-seed[3] = 17
-x = 0.4009159389765676
-x = 0.5804987598022009
-x = 0.5620918184705916
-x = 0.5724159035264323
-x = 0.849820026482087
-x = 0.0658101349497211
-x = 0.2625044697939494
-x = 0.7933464385344386
-x = 0.8767777042924849
-x = 0.699829719908992
-0.699829719908992
+
+
+
 true
 "function Modelica.Utilities.Streams.print \"Print string to terminal or file\"
 input String string = \"\" \"String to be printed\";
 input String fileName = \"\" \"File where to print (empty string is the terminal)\";
 
@@ -78,11 +24,11 @@
 for i in 1:3 loop
 if seedOut[i] == 0 then
 seedOut[i] := 1;
 end if;
 end for;
-x := 3.303710066404573e-05 * /*Real*/(seedOut[1]) + 3.299567756623883e-05 * /*Real*/(seedOut[2]) + 3.297826732183491e-05 * /*Real*/(seedOut[3]) - div(3.303710066404573e-05 * /*Real*/(seedOut[1]) + 3.299567756623883e-05 * /*Real*/(seedOut[2]) + 3.297826732183491e-05 * /*Real*/(seedOut[3]), 1.0);
+x := 3.303710066404573e-005 * /*Real*/(seedOut[1]) + 3.299567756623883e-005 * /*Real*/(seedOut[2]) + 3.297826732183491e-005 * /*Real*/(seedOut[3]) - div(3.303710066404573e-005 * /*Real*/(seedOut[1]) + 3.299567756623883e-005 * /*Real*/(seedOut[2]) + 3.297826732183491e-005 * /*Real*/(seedOut[3]), 1.0);
 end random;
 
 function testRandom3
 input Integer[3] seed_start = {23, 87, 187};
 output Real x;
@@ -126,14 +72,23 @@
 Modelica.Utilities.Streams.print(\"time = \" + String(time, \".1f\") + \", x = \" + String(x, \".6f\") + \"
 \", \"\");
 end when;
 end testRandom2;
 "
-""
+"Error: Error building simulator. Build log: gcc  -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse   -I"C:/dev/hudson/workspace/OM_Win/OM/build/include/omc/c"  -c -o testRandom1.o testRandom1.c
+gcc -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse   -I"C:/dev/hudson/workspace/OM_Win/OM/build/include/omc/c"  -c -o testRandom1_records.o testRandom1_records.c
+g++ -shared -Xlinker --export-all-symbols -fPIC -o testRandom1.dll testRandom1.o testRandom1_records.o   -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse   -I"C:/dev/hudson/workspace/OM_Win/OM/build/include/omc/c"  -L"C:/dev/hudson/workspace/OM_Win/OM/build/lib//omc" -Wl,--stack,16777216,-rpath,'C:/dev/hudson/workspace/OM_Win/OM/build/lib//omc'   -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic  -lOpenModelicaRuntimeC -Wl,-Bstatic -lomcgc -lregex -ltre -lintl -liconv -lexpat -static-libgcc -luuid -loleaut32 -lole32 -limagehlp -lws2_32 -llis -lumfpack -lklu -lcolamd -lbtf -lamd  -lsundials_idas -lsundials_kinsol -lsundials_nvecserial -lipopt -lcoinmumps -lpthread -lm -lgfortranbegin -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lopenblas -lcminpack -Wl,-Bdynamic -lm
+C:/dev/hudson/workspace/OM_Win/OM/build/lib//omc/libOpenModelicaRuntimeC.a(base_array.o):base_array.c:(.rdata$.refptr.omc_assert[.refptr.omc_assert]+0x0): undefined reference to `omc_assert'
+C:/dev/hudson/workspace/OM_Win/OM/build/lib//omc/libOpenModelicaRuntimeC.a(omc_gc.o):omc_gc.c:(.rdata$.refptr.omc_assert_warning[.refptr.omc_assert_warning]+0x0): undefined reference to `omc_assert_warning'
+collect2.exe: error: ld returned 1 exit status
+testRandom1.makefile:20: recipe for target 'testRandom1' failed
+make: *** [testRandom1] Error 1
+RESULT: 2
+"
 record SimulationResult
 resultFile = "testRandom2_res.mat",
-simulationOptions = "startTime = 0.0, stopTime = 3.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'testRandom2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
+simulationOptions = "startTime = 0.0, stopTime = 3.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'testRandom2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
 messages = "See if seed_start is OK
 seed_start[1] = 23
 seed_start[2] = 87
 seed_start[3] = 187
 See if seed is set from seed_start

Equation mismatch: omc-diff says:
Line 5: Lexical token differs:
expected: See if seed_start is OK
got:      


== 1 out of 1 tests failed [simulation/modelica/others/Random.mos_temp3229, time: 29]

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