Skip to content

Document --kind-type in ccpp_capgen.py CLI/help, and consider reversing the syntax for external kind modules #754

Description

@climbfuji

Description

The --kind-type argument for capgen accepts kind values that are defined in iso_fortran_env, and it also accepts kind_values that are defined in files provided by the user. The latter syntax, however, isn't documented.

The current syntax is, for example

--kind-type kind_phys=kind_r8:my_host_kinds

and

--kind-type kind_phys=real64

for which the code checks `iso_fortran_env.

I am suggesting to reverse the syntax to

--kind-type NAME=[MODULE:]SPEC

to match my suggestion for external ddts in #751 and because it is more intuitive given the corresponding Fortran code:

use my_host_kinds, only: kind_r8

In addition, there is also this metadata attribute that uses MODULE:SPEC in this order:

[ccpp-table-properties]
  name = temp_set
  type = scheme
  source_path = source_dir2
  kind_spec = temp_kinds:kind_temp=>temp_r8
  dependencies = temp_kinds.F90
  dependencies_path = adjust

Not sure whether anyone is using this syntax, though.

Solution

See above

Alternatives (optional)

Don't change the syntax, but update the CLI/capgen help.

Related to (optional)

#751

Activity

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

    capgenbugs, requests, etc. that involve ccpp_capgencapgen-unificationIssues/PRs necessary for capgen/prebuild unificationenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions