Add support for MPI_Comm (mpi08) object in capgen
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 25
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 2
Description
Description
The MPI_Comm DDT must be known to capgen to enable passing around variable of type MPI_Comm.
Summary
In trying to incorporate MPI 2008 into CAM-SIMA, @nusbaume ran into an Unknown DDT type, MPI_Comm error (coming from ~line 540 in metadata_table.py).
A few things I noticed when I was trying to understand the underlying issue:
- Capgen does not use
ccpp_types.F90at all right now (which I believe is what prebuild uses for this purpose). - Capgen does not currently support the way that
ccpp_types.F90/.metagrabs theMPI_CommDDT. It expects that all DDTs for which you have metadata will be defined in the Fortran (rather than just used and made public)
Previously closed issue: https://github.com/NCAR/ccpp-framework/issues/390
Possible Solution
I'm not sure of the best solution, but a couple thoughts:
- Build MPI_Comm into the framework as a DDT that will always be there (though perhaps we'd need a flag to turn this off in case someone is building without MPI).
- More generally, update the parser/metadata validation to allow for DDT variables that aren't defined, but just used from an external source and made available/public (as in ccpp_types.F90 currently)
Here's the PR that enabled use of the DDT for prebuild: https://github.com/NCAR/ccpp-framework/pull/523
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with metadata_table.py around line 540, then compare capgen’s handling with ccpp_types.F90 and .meta metadata. Review PR #523 and the previously closed issue #390 before choosing an approach. Done means capgen recognizes MPI_Comm rather than reporting an unknown DDT type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran, python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100