Skip to content
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

Suite-level variables edge case for when variable is used only in run phases #559

Open
peverwhee opened this issue Apr 25, 2024 · 1 comment
Assignees
Labels

Comments

@peverwhee
Copy link
Collaborator

Description

When you have a situation like this:

   Group 1:
      scheme_x_run:
         real(kind_phys), intent(out) :: some_variable(:,:) ! some_variable_standard_name

   Group 2:
      scheme_y_run:
         real(kind_phys), intent(in)  :: some_variable(:,:) ! some_variable_standard_name

where some_variable_standard_name is not used in any other phase and is not a host variable:

  1. The framework will promote some_variable_standard_name to the suite level (which is the correct behavior)
  2. The framework will attempt to allocate that variable in the suite init phase, but will try to allocate it to horizontal_loop_begin:horizontal_loop_end (which are unavailable and disallowed to exist in the init phase).

Steps to Reproduce

  1. Modify an existing test to reflect the situation described above (variable must be in run phase of two different schemes in two different groups and must have dimension horizontal_loop_extent)
  2. The error you will see will look like this:
    parse_source.CCPPError: Dimension variable, 'horizontal_loop_begin', not found, at <metadata file>

Additional Context

I'm not sure how/if it's currently working when the you have the same situation as above but with dimension horizontal_dimension.

Not sure how to fix yet; need to figure out to ensure we pass horizontal_dimension into the suite init phase and manually override the variable's dimensions to allocate to horizontal_dimension (rather than horizontal_loop_extent)

@peverwhee peverwhee added the bug label Apr 25, 2024
@peverwhee peverwhee self-assigned this Apr 25, 2024
@peverwhee
Copy link
Collaborator Author

Problem not specific to horizontal_loop_extent - also appears if you use horizontal_dimension and horizontal_dimension is not already being passed in to an init phase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant