You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the time the unit tests pass well, but in rare cases the test for SWFlowTempTest.MainSoilTemperatureFunction_LyrMAX fails with
[ RUN ] SWFlowTempTest.MainSoilTemperatureFunction_LyrMAX
test/test_SW_Flow_lib_temp.cc:569: Failure
Expected: (sTemp3[k]) < (100), actual: 999 vs 100
test/test_SW_Flow_lib_temp.cc:569: Failure
Expected: (sTemp3[k]) < (100), actual: 999 vs 100
test/test_SW_Flow_lib_temp.cc:569: Failure
Expected: (sTemp3[k]) < (100), actual: 999 vs 100
test/test_SW_Flow_lib_temp.cc:569: Failure
Expected: (sTemp3[k]) < (100), actual: 999 vs 100
test/test_SW_Flow_lib_temp.cc:569: Failure
Expected: (sTemp3[k]) < (100), actual: 999 vs 100
...
This is easy to ignore locally but simply re-running the unit tests; however, this is not suitable for our CI checks.
--> My guess is that this is because of the use of random number generator in the initialization of the test variables which produces values that break the function (unexpectedly) in these rare cases:
for (i = 0; i < nlyrs2; i++) {
bDensity2[i] = fmaxf(RandNorm(1.,0.5), 0.1); // greater than 0.1
fc2[i] = fmaxf(RandNorm(1.5, 0.5), 0.1); // greater than 0.1
...
Most of the time the unit tests pass well, but in rare cases the test for
SWFlowTempTest.MainSoilTemperatureFunction_LyrMAX
fails withThis is easy to ignore locally but simply re-running the unit tests; however, this is not suitable for our CI checks.
--> My guess is that this is because of the use of random number generator in the initialization of the test variables which produces values that break the function (unexpectedly) in these rare cases:
which was introduced by commit ae0b6ec
The text was updated successfully, but these errors were encountered: