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

capgen should keep cap names under 63 characters (12 hours) #337

Open
gold2718 opened this issue Nov 17, 2020 · 3 comments
Open

capgen should keep cap names under 63 characters (12 hours) #337

gold2718 opened this issue Nov 17, 2020 · 3 comments
Assignees
Labels
bug For issues describing bugs, or PRs fixing bugs capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification Issues/PRs necessary for capgen/prebuild unification

Comments

@gold2718
Copy link
Collaborator

Concatenating a suite name, group name, and phase can result in a cap interface name which exceeds 63 characters.
Proposal is to use name mangling to keep name under 63 characters.
Suite name kept to 35 characters
Group names kept to 20 characters

@gold2718 gold2718 added bug For issues describing bugs, or PRs fixing bugs capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification Issues/PRs necessary for capgen/prebuild unification labels Nov 17, 2020
@gold2718 gold2718 self-assigned this Nov 17, 2020
@gold2718 gold2718 changed the title capgen should keep cap names under 63 characters capgen should keep cap names under 63 characters (12 hours) Oct 18, 2021
@mkavulich mkavulich self-assigned this Aug 30, 2022
@mkavulich
Copy link
Collaborator

I have done some investigation, and I'll just post some information about the current state of CCPP with regards to this issue, as well as a proposed solution.

Current state of CCPP

Currently there is no cap that breaks the 63 character limit. Using the longest possible names given the current suites:

37 (FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp) + 12 (fast_physics) + 7 (tsfinal is longest phase name) + 3 ("cap") + 3 concatenation underscores = 62 for a theoretical max-length name using the current state of the UFS weather model.

In actuality, the longest right now is a tie between FV3_GFS_v16_coupled_nsstNoahmpUGWPv1_fast_physics_tsfinal_cap and FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp_stochastics_tsfinal_cap at 61 characters each.

Path forward

Unless there are some other suites/groups I'm missing, setting limits to the current state of the CCPP would keep this from being an issue in the future: limit suite names to 37 characters, group names to 12 characters, and phase names (assuming we ever get new ones) to 7 characters. This could be enforced through the cap generation process itself with the right checks.

@climbfuji
Copy link
Collaborator

I will note that I had to internally abbreviate timestep_final and timestep_init to tsfinal and tsinit in order to stay below the 63-character limit. That's always been a bit of a hack, but it's been there for two years or so and worked fine.

@mkavulich
Copy link
Collaborator

mkavulich commented Sep 13, 2022

Okay, following discussion at today's ccpp-framework meeting, I will procede with implementing this solution imposing hard limits on these string lengths in prebuild (and capgen if a simple combined change). If physics developers revolt at the idea of keeping their suites to 37 characters, we can re-visit that in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues describing bugs, or PRs fixing bugs capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification Issues/PRs necessary for capgen/prebuild unification
Projects
None yet
Development

No branches or pull requests

3 participants