-
Notifications
You must be signed in to change notification settings - Fork 64
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
initialized_set_block bug fix #503
Conversation
…_block to avoid referencing the CCPP data type when it is not available (fixes an init-phase bug in UFS CMEPS that doesn't have any init phases of schemes in the suites being used)
@mkavulich @climbfuji @gold2718 This is a bugfix for #463 and this must be merged before the UFS can use the latest ccpp-framework commit. |
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.
I think that's ok, but I am not entirely familiar with how the NRL are using the member functionality (for which initialized
was turned into an array). Is it potentially dangerous to set all members to initialize because we don't have enough information on the member for which this is called?
It would have been more along the lines of ccpp_prebuild
if the initialized_set_block
was a formatted string like the others (Group.initialized_set_blocks['fallback']
maybe, same for test_blocks
)?
@michalakes can you comment please? |
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.
This is one of those weird times when I think I understand the fix but no do not understand how it ever worked before.
I'm out of the office until next week but I'll test to make sure this proposed fix does no harm for the NRL codes and let you know. |
… the entire intialized array
10fd091
to
8d517ce
Compare
You make a really good point about the danger of setting the entire initialized array. While it fixes the UFS problem, it may introduce another for NRL. I've updated the fix to just pass in the ccpp_t instance ( I'm re-testing in UFS to make sure, but @climbfuji @michalakes @gold2718 please take a look at the updated fix when you get a chance. |
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.
Wow, that's a lot cleaner and safer in my opinion. Thanks for considering my comments on the original version.
Passed UFS regression test that was failing initially. I'm rerunning the rest now... |
Passed all UFS RTs on Hera except control_p8_gnu which is likely a different, unrelated issue: ufs-community/ufs-weather-model#1939 |
@michalakes Would you be able to test the latest fixes here? Just ensuring this won't cause any problems on the NRL side. |
Yes, sorry. I got sidetracked this week. Please stand by... |
I tested fix with NEPTUNE and "does no harm". I wasn't able to update to the latest CCPP because of some other issues in progress, but I spliced in the set of changes to external/ccpp/ccpp-framework/scripts/mkstatic.py and tested with one of the cases we have that exercise two domains. That worked as before. So... thumbs up from our end. Thanks very much for checking with us on this! And sorry for the delay. -John |
Thanks for confirming @michalakes! Merging now. |
…han local name to fix bug (#517) This PR is a bugfix for ufs-community/ccpp-physics#127 #503 was merged to fix the case when no scheme within a group has an init phase. A bug was introduced described in the ccpp-physics issue above. This fix ensures that the ccpp_t_instance variable is only passed once in the caps.
When trying to update the latest UFS to use the latest CCPP framework hash, one of the regression tests using CMEPS uses a suite that doesn't have any schemes with a non-empty
init
phase. Due to this, the subroutine generated for theinit
phase in the cap doesn't have access to a ccpp_t instance. Yet, in mkstatic.py a line likeinitialized({ccpp_var_name}%ccpp_instance) = .true.
is put in the subroutine regardless, resulting in a compilation error.A fix is to pass the ccpp_t_instance into the group cap for the
init
phase when it is otherwise empty so thatinitialized({ccpp_var_name}%ccpp_instance) = .true.
has access to the ccpp_t_instance.User interface changes?: No
Fixes: No issue started
Testing:
test removed:
unit tests:
system tests: UFS RTs (re-running as of 2023/10/12), SCM RTs (completed successfully)
manual testing: