Skip to content

MPI-5: Need to define values for all pre-defined data types in mpi.h include file #13741

@hppritcha

Description

@hppritcha

The MPI-5 specification (available at https://www.mpi-forum.org/docs/mpi-5.0/mpi50-report.pdf) introduced a change to whether or not optional MPI datatypes are to be specified in the mpi.h include file. The rule now is that values for all pre-defined data types need to be present in mpi.h, and that an application can use the MPI_Type_size function at runtime to determine whether or not a pre-defined data type is available.

See section 20.4 of the MPI-5 standard for further details. This section also describes the usage of MPI_Type_size to determine whether or not a pre-defined datatype is available at runtime.

The table of optional Fortran data types of concern in this issue is presented in the table titled Optional data types (Fortran) on page 871 of MPI-5 standard.

There are several problems in the current Open MPI code base to be addressed. First the optional fortran datatypes are currently conditionally defined in mpi.h. These conditions need to be removed. Second, the initialization for pre-defined datatypes that aren't available is not correct. The wrong size is returned when calling MPI_Type_size with these types. It should be returning a size of MPI_UNDEFINED.

The test case to use is at https://gist.github.com/hppritcha/c0b0c49e77e472819dd5864b56388b8d . See the instructions in the comments section at the beginning of this test case to see how to configure and build Open MPI to build the test. Note you need to configure Open MPI with the --with-devel-headers configure option in order to build the test.

The test can be used to check for correctness of source code changes you make to Open MPI to solve this issue.

Note that you will want to check your results using at least two compilers. I would suggest testing with the GNU 8.5 and GNU 15.1.0 compilers. If you have access to clang you may want to try with that compiler suite as well. You should also check compiling/running the test using an install of Open MPI with fortran support disabled. You can disable Open MPI fortran support using the --disable-mpi-fortran configure option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions