-
Notifications
You must be signed in to change notification settings - Fork 553
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
in w3iors use NSEA instead of NSEAL in serial write/read of VA #954
in w3iors use NSEA instead of NSEAL in serial write/read of VA #954
Conversation
@MatthewMasarik-NOAA the regtests were run with an earlier develop. I'm leaving that as is for now unless you want me to run additional tests in addition to the ones you've made. If someone else wants to do a check to insure I haven't missed other NSEAL in w3iors that's probably a good idea too. |
Thanks to @MatthewMasarik-NOAA who caught an error I did not: There is an error when running ww3_shel for:
I'm going to mark this as a draft for now until I can figure out why this is failing. In the meantime I'll move forward with the gint update that sets NSEAL=NSEA. FYI @ukmo-ccbunney since I know you're running regtests. |
Hi @JessicaMeixner-NOAA It looks like it is failing around line 636 in w3iorsmd, probably because of a out-of-range JSEA value:
I think this is happening because this block of code is entered for both MPI and SHRD use cases, so the loop would have to be over NSEAL to work when run under MPI (as in this case) As far as I can tell, the change you made at line 736 is safe as that bit of code only ever gets executed if the model is run in SHRD mode thanks to the #ifdef on line 738 and the conditional on line 740. I guess there are two options here:
|
Just to confirm, modifying w3iorsmd as per below fixes the issue (and the restarts are b4b with develop). ! w3iorsmd.f90: Line 631
#ifdef W3_MPI
DO JSEA=1, NSEAL
CALL INIT_GET_ISEA(ISEA, JSEA)
#else
DO JSEA=1, NSEA
ISEA = JSEA
#endif
NREC = ISEA + 2
RPOS = 1_8 + LRECL*(NREC-1_8)
WRITEBUFF(:) = 0.
WRITEBUFF(1:NSPEC) = VA(1:NSPEC,JSEA)
WRITE (NDSR,POS=RPOS,ERR=803,IOSTAT=IERR) WRITEBUFF
END DO |
Okay - I finally updated the code with @ukmo-ccbunney suggestion and am re-running regtests. |
A re-run of the regtests provide expected results:
|
Changes look good to me. Just running regression tests now. |
Awesome. Thanks for testing @ukmo-ccbunney |
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.
Code review Pass
Testing Pass
Regressions tests show just the known non-b4b's as non-identical.
**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UQ_MPI_e_c (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e (1 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2 (10 files differ)
mww3_test_03/./work_PR1_MPI_d2 (12 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c (12 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2 (15 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2 (16 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2 (15 files differ)
ww3_tp2.10/./work_MPI_OMPH (6 files differ)
ww3_tp2.16/./work_MPI_OMPH (4 files differ)
ww3_ufs1.3/./work_a (3 files differ)
**********************************************************************
************************ identical cases *****************************
**********************************************************************
@JessicaMeixner-NOAA, thank you for this clarification of loop limit for serial IO. |
* origin/develop: handle NaN air-sea temperatures from nearest land points (NOAA-EMC#869) Increase valid_max for f in ounp (NOAA-EMC#1014) Bugfix deallocation of invalid memory in ww3_prnc (NOAA-EMC#1016) Update to orion intel module path and two typo corrections. (NOAA-EMC#1011) Bugfix to out of bounds array write in w3profsmd_pdlib.f90 (NOAA-EMC#1013) Simple logic fix for time interpolation of boundary nodes at the end of W3XYPFSNIMP. (NOAA-EMC#1005) in w3iors use NSEA instead of NSEAL in serial write/read of VA (NOAA-EMC#954) Update documentation for UNST namelist (NOAA-EMC#986) In certain coupled configurations, the piece of code testing the coupling frequency to check if 'receive' coupling exchanges need to take place fail, resulting in an infinite loop causing the integration between time zero and the first time step to repeat indefinitely. This check needs to be rewritten, which fixes also issue NOAA-EMC#816 in a simpler way. (NOAA-EMC#999)
Pull Request Summary
Change NSEAL-> NSEA in w3iors in serial section of the code for writing/reading VA
Description
In w3iors in the serial section, NSEAL is used and while this "works" NSEAL is a variable defined for MPI and if you use w3iors in a non ww3_shel or ww3_multi program and this is not set, it could break the program.
Please also include the following information:
Issue(s) addressed
fixes #940
Commit Message
in w3iors use NSEA instead of NSEAL in serial write/read of VA
Check list
Testing
matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt