Skip to content

Local name collisions in generated group caps #772

Closed

Description

@jimmielin

Description

Two schemes in the same suite group cap using the same name for arguments that have different meanings (i.e., different standard name) might generate group cap that is uncompilable. See #771 for reproducer

Steps to Reproduce

sima_2026-07-15 in CAM-SIMA

capgen v0

Reproducer in #771

Two schemes, same argument name, one is constituent, another is a normal quantity. At least this situation will trigger the bug, possibly others.

Additional Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Machine: Derecho
  • Compiler: GNU
  • Suite Definition File or Scheme:

https://github.com/jimmielin/atmospheric_physics/blob/b9b4af8be3b3d08deef97721048dac5e3aaab41b/suites/suite_cam7.xml
schemes clashing ni

former defines it as

[ ni ]
  standard_name = mass_number_concentration_of_ice_wrt_moist_air_and_condensed_water
  units = kg-1
  type = real | kind = kind_phys
  dimensions = (horizontal_loop_extent, vertical_layer_dimension)
  intent = in
  advected = True

latter defines it as

[ ni ]
  standard_name = brunt_vaisalla_frequencies_at_interfaces
  units = s-1
  type = real | kind = kind_phys
  dimensions = (horizontal_loop_extent, vertical_interface_dimension)
  intent = in

PR #771

Output

Please include any relevant log files, screenshots or other output here.

07-22 17:01 CIME.utils   WARNING  Error: Symbol 'ni' at (1) already has basic type of REAL

07-22 17:01 CIME.utils   WARNING  Error: Allocate-object at (1) must be ALLOCATABLE or a POINTER

07-22 17:01 CIME.utils   WARNING  Error: Dummy argument 'ni' with INTENT(IN) in variable definition context (actual argument to INTENT = OUT/INOUT) at (1)

07-22 17:01 CIME.utils   WARNING  Error: 'array' argument of 'allocated' intrinsic at (1) must be ALLOCATABLE

07-22 17:01 CIME.utils   WARNING  Error: Allocate-object at (1) must be ALLOCATABLE or a POINTER

Activity

  1. added
    bug
    on Jul 23, 2026
  2. climbfuji commented on Jul 23, 2026

    @climbfuji
    Collaborator

    Can you clarify if this is with capgen v0 or v1?

  3. jimmielin commented on Jul 23, 2026

    @jimmielin
    ContributorAuthor

    Can you clarify if this is with capgen v0 or v1?

    Thanks, v0. Updated in issue body

  4. peverwhee commented on Jul 30, 2026

    @peverwhee
    Collaborator

    @jimmielin and Claude confirmed that this issue is not present for v1 (no fix needed in feature/capgen-v1)

    EDIT: ^^ this is somewhat untrue. While confirming that this specific issue isn't a problem in v1, Claude identified a similar, but distinct issue in v1 - #774

  5. climbfuji commented on Jul 31, 2026

    @climbfuji
    Collaborator

    @jimmielin and Claude confirmed that this issue is not present for v1 (no fix needed in feature/capgen-v1)

    EDIT: ^^ this is somewhat untrue. While confirming that this specific issue isn't a problem in v1, Claude identified a similar, but distinct issue in v1 - #774

    Yes, thanks for the report. Will work on it in the next two weeks.

  6. mkavulich commented on Aug 27, 2026

    @mkavulich
    Collaborator

    It looks like this was resolved with #771, and a similar remaining issue in capgenv1 is covered by #774. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions