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.F90 at all right now (which I believe is what prebuild uses for this purpose).
- Capgen does not currently support the way that
ccpp_types.F90/.meta grabs the MPI_Comm DDT. 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: #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: #523
Description
The
MPI_CommDDT must be known to capgen to enable passing around variable of typeMPI_Comm.Summary
In trying to incorporate MPI 2008 into CAM-SIMA, @nusbaume ran into an
Unknown DDT type, MPI_Commerror (coming from ~line 540 inmetadata_table.py).A few things I noticed when I was trying to understand the underlying issue:
ccpp_types.F90at all right now (which I believe is what prebuild uses for this purpose).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: #390
Possible Solution
I'm not sure of the best solution, but a couple thoughts:
Here's the PR that enabled use of the DDT for prebuild: #523