-
Notifications
You must be signed in to change notification settings - Fork 388
Fix threading issue in MPAS-O GM routine #376
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
Fix threading issue in MPAS-O GM routine #376
Conversation
vanroekel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved by visual inspection
|
Just a quick note -- I had intel inspector working and did some checking on memory as well. The tools points at invalid memory access in the gm code as well, particularly this loop: I believe this is because some of the arrays are dimensioned nEdges and the loop goes over nEdges+1. Also the "private(k)" is missing in the code -- I'll commit it to this PR. |
|
@amametjanov or @philipwjones could you please look at the openMP pragmas and confirm that they are done correctly? |
|
@mark-petersen OpenMP pragmas look ok to me - I know @amametjanov has been removing the private clauses since there is a default private clause on the top-level parallel region, so they're redundant but do no harm. |
|
Yes, this looks good. I think the last two commits, which make loop extents match array sizes, fix the real culprits. Formatting is so much better too! |
70baf5d to
e5075b9
Compare
|
I moved the commits over to ocean/develop, otherwise we will bring extra things over with the merge. |
This PR fixes a threading issue that was introduced in [E3SM PR#3057] (E3SM-Project/E3SM#3057) that brought in the initial implementation of 3D varying GM bolus. After that commit, some E3SM threading tests were observed to fail with different results. Tested with: * SMS_P12x2.T62_oQU240.CMPASO-NYF.compy_intel - BFB results 10 times * SMS_P12x2.ne4_oQU240.A_WCYCL1850.compy_intel.allactive-mach_mods - BFB * results 10 times This last test is one that was failing on sandiatoss3.
…_update_maint1.2 Fix threading issue in MPAS-O GM routine MPAS-Dev#376 This PR fixes a threading issue that was introduced in E3SM PR #3057 that brought in the initial implementation of 3D varying GM bolus. After that commit, some E3SM threading tests were observed to fail with different results. Tested with: SMS_P12x2.T62_oQU240.CMPASO-NYF.compy_intel - BFB results 10 times SMS_P12x2.ne4_oQU240.A_WCYCL1850.compy_intel.allactive-mach_mods - BFB results 10 times This last test is one that was failing on sandiatoss3.
Update maint1.2: 3D varying GM This update adds the following PRs from ocean/develop: - Adds options for 3d varying GM bolus and 2d varying phase speed #288 - Add GM bolus eddy stats #339 - Fix threading issue in MPAS-O GM routine #376 - compute landIceMask using geometric_features #447 - bug fixes for the nonlocal source term in KPP #305
#3513) Update maint1.2: add 3D varying GM This update brings in a new mpas-source submodule with the following PRs from MPAS ocean/develop: * Adds options for 3d varying GM bolus and 2d varying phase speed (MPAS-Dev/MPAS-Model#288) * Add GM bolus eddy stats (MPAS-Dev/MPAS-Model#339) * Fix threading issue in MPAS-O GM routine (MPAS-Dev/MPAS-Model#376) * Compute landIceMask using geometric_features (MPAS-Dev/MPAS-Model#447) * Bug fixes for the nonlocal source term in KPP (MPAS-Dev/MPAS-Model#305) and from E3SM master: * Change all ocean output files to single precision (E3SM #3360) [non-BFB]
…elop This PR fixes a threading issue that was introduced in [E3SM PR#3057] (E3SM-Project/E3SM#3057) that brought in the initial implementation of 3D varying GM bolus. After that commit, some E3SM threading tests were observed to fail with different results. Tested with: * SMS_P12x2.T62_oQU240.CMPASO-NYF.compy_intel - BFB results 10 times * SMS_P12x2.ne4_oQU240.A_WCYCL1850.compy_intel.allactive-mach_mods - BFB * results 10 times This last test is one that was failing on sandiatoss3.
This PR fixes a threading issue that was introduced in E3SM PR #3057 that brought in the initial implementation of 3D varying GM bolus. After that commit, some E3SM threading tests were observed to fail with different results.
Tested with:
This last test is one that was failing on sandiatoss3.