E3SM-Project / scream

Fork of E3SM used to develop exascale global atmosphere model written in C++
https://e3sm-project.github.io/scream/
Other
80 stars 57 forks source link

Shoc tests failing in master #600

Closed bartgol closed 4 years ago

bartgol commented 4 years ago

The error looks like the following:

/shoc/tests/shoc_pdf_compute_qs_tests.cpp:79: FAILED:
  REQUIRE( SDS.qs1 < qs1_test1 )
with expansion:
  0.622 < 0.622

@singhbalwinder and @tcclevenger first reported this kind of failure. @AaronDonahue also noticed it in LLNL machines nightlies, and I was able to reproduce it on my laptop. The error occurs not every time, which pointed to uninited memory. Valgrind seemd to confirm the suspicion, so the task is now to go up the update-tree and see which of the variables contributing to qs1 is not initialized.

bartgol commented 4 years ago

Actually, I am now able to reproduce the error at every single run.

bartgol commented 4 years ago

@bogensch it appears that shoc_assumed_pdf_compute_liquid_water_flux uses w_first in its formula, but that variable is never inited in shoc_pdf_compute_liqflux_tests.cpp. I added a line initing it, and it removed valgrind error.

I don't know what's the correct value to pick though, so I can't fix the test. Could you take a look at it?

bogensch commented 4 years ago

@bartgol thanks for reporting. I will fix this.

singhbalwinder commented 4 years ago

Thanks @bartgol for looking into it and finding the issue.