Skip to content

Add support for MPI_Comm (mpi08) object in capgen #686

@peverwhee

Description

@peverwhee

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:

  1. Capgen does not use ccpp_types.F90 at all right now (which I believe is what prebuild uses for this purpose).
  2. 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:

  1. 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).
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions