Repository navigation
Fix OMP Directives and Loop Bounds in Ocean - #698
Conversation
Update mixed_layer_depth file to include changes necessary for the localized OpenMP threading (PR MPAS-Dev#513). Also remove interp_local from private clause.
The ALE thickness routine looped over nCellsAll, instead of looping over a subset of the cells. This caused the code to do calculations w/ unititialized values. This commit corrects the loop bounds.
|
This branch PASSes the nightly regression suite, as well as the following E3SM tests: Prior to this PR, the This is non-bfb in the @philipwjones Continuing on our previous discussion, Valgrind likely would have pointed out these issues even though all of our tests were PASSing. |
|
This PR does indeed appear to fix #685 when running on Badger (I first confirmed that the code fails in the EC60to30 prep_spin_up1 test without these changes). |
mark-petersen
left a comment
There was a problem hiding this comment.
@mattdturner, this is perfect. I was able to test the PR in the way that we discussed. These are all nightly regression suites with gnu 6 on badger:
- current ocean/develop, OPENMP=false versus multi-threaded: Global ocean cases FAIL to match
- This PR, OPENMP=false versus multithreaded: PASS match bfb
- This PR OPENMP=false versus ocean/develop OPENMP=false: PASS match bfb
This is excellent! Thanks for testing the EC60to30 spinup as well.
|
Also just did this same comparison but with Intel19:
That is good to check, but it wasn't a problem to begin with. |
Fix OMP Directives and Loop Bounds in Ocean #698
Update mpas-source: Fix OMP Directives and Loop Bounds in Ocean This PR is a bugfix that corrects errors in a few OpenMP private clauses, and fixes loop bounds in an ALE thickness routine. For additional details of the errors that this PR resolves, see #3826 and testing at MPAS-Dev/MPAS-Model#698. This PR may be non-BFB with threading on some compilers. Fixes #3826 [non-BFB]
Update mpas-source: Fix OMP Directives and Loop Bounds in Ocean This PR is a bugfix that corrects errors in a few OpenMP private clauses, and fixes loop bounds in an ALE thickness routine. For additional details of the errors that this PR resolves, see #3826 and testing at MPAS-Dev/MPAS-Model#698. This PR may be non-BFB with threading on some compilers. Fixes #3826 [non-BFB]
|
@ambrad, @ndkeen, @rljacob, @vanroekel, @golaz @ambrad if your E3SM tests were run from master after E3SM-Project/E3SM#3844 was merged (Sept 23) then this is not the specific source of your bfb mismatch. Still, I think the current mismatch indicates that there is a bug, and the no-threading is much more likely to be correct. Until the mismatch is found, I would recommend compiling with OpenMP off. |
|
Thanks @mark-petersen; this is good information. The branch @ndkeen ran for his PE layouts analysis does not include PR 3844. For clarity, the branch we are advertising to others (E3SM-Project/E3SM#3879) does, because it's even with master as of Tues 6 Oct night. Thus, the 4 out of 24 threaded runs that diff may be explained by not having PR 3844 included in the build. |
This PR is a bugfix that corrects errors in a few OpenMP private clauses, and fixes loop bounds in an ALE thickness routine.
For additional details of the errors that this PR resolves, see E3SM-Project/E3SM#3826
This also potentially fixes #685 , but I will need to test to confirm.