NCAR / NCAR/ccpp-framework

capgen Fortran parser does not accept internal DDTs as part of a registered DDT

Open
#749 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug capgen capgen-unification
Dominant language
Python
Stars
25
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
2

Description

Description

Error:

Reading host model data from /path/to/mod_mytype.meta
table: 'linterp_table_t' is not a valid derived Fortran type, at /path/to/mod_mytype.meta:33
'
CMake Error at external/ccpp/CMakeLists.txt:135 (message):
  ccpp_capgen.py FAILED: result = 1

-- Configuring incomplete, errors occurred!

Fortran:

  !> Corresponding derived type mytype_dat_t
  !! \section arg_table_mytype_dat_t Argument Table
  !! \htmlinclude mytype_dat_t.html
  !!
  type mytype_dat_t
    type(linterp_table_t) :: table
...

Metadata:

[ccpp-table-properties]
  name = mytype_dat_t
  type = ddt
  dependencies = ../ccpp-physics/physics/tools/mpiutil.F90,mod_utils.F90
  module_name = mod_mytype

[ccpp-arg-table]
  name = mytype_dat_t
  type = ddt

The type linterp_table_t is defined in the dependency mod_utils.F90 and is nowhere exposed in the metadata. Capgen shouldn't care. All it needs to know is how to access mytype_dat_t and what dependencies to compile.

Steps to Reproduce

See above. Should be reproducible with any of the capgen unit tests from develop

Additional Context

n/a

Output

See above

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ccpp_capgen.py and the capgen unit tests referenced in the issue, then inspect the failure reported through external/ccpp/CMakeLists.txt:135. Reproduce the case where mytype_dat_t contains linterp_table_t from mod_utils.F90. Done means capgen accepts the registered DDT without metadata for the internal type while retaining the listed dependency handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, fortran, python
Domain
build-system, compilers, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.