Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix#210 intermittent fails #244

Merged
merged 4 commits into from
Apr 26, 2019
Merged

Conversation

nip5
Copy link
Contributor

@nip5 nip5 commented Feb 21, 2019

This fixes the problem but is a hack so while it fixes this so our CIs pass, further investigation is necessary for a more permanent fix later on. This just changes the random number lower bound for bDensity2[i] from .1 to .129. It still generates the value of bDensity2[i] randomly.

@nip5 nip5 requested a review from CaitlinA February 21, 2019 22:11
@codecov
Copy link

codecov bot commented Feb 21, 2019

Codecov Report

Merging #244 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #244      +/-   ##
==========================================
- Coverage   61.43%   61.41%   -0.03%     
==========================================
  Files          19       19              
  Lines        3558     3558              
==========================================
- Hits         2186     2185       -1     
- Misses       1372     1373       +1
Impacted Files Coverage Δ
rands.c 63.77% <0%> (-0.79%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 176ec18...0146104. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 21, 2019

Codecov Report

Merging #244 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #244      +/-   ##
==========================================
+ Coverage   61.43%   61.46%   +0.02%     
==========================================
  Files          19       19              
  Lines        3558     3558              
==========================================
+ Hits         2186     2187       +1     
+ Misses       1372     1371       -1
Impacted Files Coverage Δ
rands.c 65.35% <0%> (+0.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b76e85e...d6a902e. Read the comment docs.

@nip5 nip5 added the Bugfix Used for pull requests to signify the merging branch is a bug fix. label Feb 22, 2019
Copy link
Member

@dschlaep dschlaep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not fixing #210. It still can fail, e.g.,

soilTemp_rng.state=fe4d618741a96818, soilTemp_rng.inc=11
test/test_SW_Flow_lib_temp.cc:589: Failure

printed by TEST(SWFlowTempTest, MainSoilTemperatureFunction_LyrMAX)

...
RandSeed(0,&soilTemp_rng);
#include <inttypes.h>
swprintf("state=%" PRIx64 ", inc=%" PRIx64 "\n", soilTemp_rng.state, soilTemp_rng.inc);
...

- keep soil bulk density fixed -- instead of setting it by a random number
- keep SWC(wilting point), SWC(field capacity), SWC(saturation) fixed and physically well defined (see code comments) -- instead of setting field capacity by a random number
- only set SWC by a uniform random number and keep it between field capacity and wilting point

-> goal: keep setup simple: this is to test the soil temperature function and not a random number function

- new script `many_test_runs.sh` to repeatedly run unit tests

-> this commit has not failed in 2,500 test runs: close #210
```
N=2500 ./many_test_runs.sh
```
@dschlaep dschlaep merged commit 9c04f25 into master Apr 26, 2019
@dschlaep dschlaep deleted the Bugfix#210_Intermittent_Fails branch April 26, 2019 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Used for pull requests to signify the merging branch is a bug fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants