-
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
Capgen in SCM: Multiple instances of local_name in Group Cap #631
base: develop
Are you sure you want to change the base?
Capgen in SCM: Multiple instances of local_name in Group Cap #631
Conversation
…ustinswales/ccpp-framework into bugfix/local_var_names_in_caps
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 have a suggesting for modifying the test a bit but it looks okay for scalar vars. It would be nice to also implement a DDT test as @peverwhee suggested.
@gold2718 Thanks for the suggestions. I added them to the tests. @peverwhee There are some various tests in the pipeline for DDTs (e.g. #637 #640), albeit stressing different things. I could extend those or add here. Thoughts? |
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.
Thanks for fixing this!
@dustinswales I vote whatever's easiest for you! |
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.
👍
# Check if local_name exists in Group. If applicable, Create new | ||
# variable with uniquie name. There are two instances when new names are |
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.
# Check if local_name exists in Group. If applicable, Create new | |
# variable with uniquie name. There are two instances when new names are | |
# Check if local_name exists in Group. If applicable, create new | |
# variable with unique name. There are two instances when new names are |
@@ -41,6 +41,13 @@ | |||
kind = kind_phys | |||
intent = in | |||
top_at_one = True | |||
[ scalar_var ] |
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 probably my capgen ignorance showing, but I'm not seeing how these new test variables are checking the new logic. They aren't in DDTs and they aren't duplicate names with different standard names, unless I'm missing something?.
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.
@mkavulich it's the variable naming in the caps. The test now uses same local_name for 3 different standard_names. To see this, run the var_compatabilty_test and look at the suite cap in ct_build/ccpp, you will see that each instance of scalar_var in the Cap has been renamed to a unique name, scalar_var1, Scalar_var2, and Scalar_var3, respectively.
Description:
Allow for multiple instances of the same local_name being used in the Group cap for two situations:
a) with different standard_names
b) in different DDTs .
User interface changes?: No
Fixes: #629
Testing:
Added to var_compatibility_test to exercise feature.
This PR contains changes included in #630