Skip to content

All TYPE(MPI_Foo) types need to be in the "mpi" module #8264

Open
@jsquyres

Description

@jsquyres

While proofing the MPI 4.0 RC document, I came across this gem in the appendix:

! Fortran handles in the mpi_f08 and mpi modules
TYPE(MPI_Comm)
TYPE(MPI_Datatype)
TYPE(MPI_Errhandler)
TYPE(MPI_File) 
TYPE(MPI_Group) 
TYPE(MPI_Info) 
TYPE(MPI_Message) 
TYPE(MPI_Op) 
TYPE(MPI_Request) 
TYPE(MPI_Session) 
TYPE(MPI_Win)

I thought that this was a mistake (i.e., that they have to be in both mpi_f08 and mpi), but then I see in 19.1.3 where we discuss the requirements of the mpi module:


  • Define the derived type MPI_Status and all named handle types that are used in the mpi_f08 module. For these named handle types, overload the operators .EQ. and .NE. to allow handle comparison via the .EQ., .NE., == and /= operators.

    Rationale. They are needed only when the application converts old-style INTEGER handles into new-style handles with a named type. (End of rationale.)


I don't think Open MPI currently does this. @ggouaillardet recently added TYPE(MPI_Status) to the mpi module when we had the kerfuffle about the MPI_Status_f082f() and MPI_Status_f2f08() routines, but I don't think we realized that we actually needed to add:

  1. All the TYPE(MPI_Foo) types, and
  2. The .EQ., .NE., ==, and /= operators

to the mpi module.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions