Skip to content

Main issue13741#9

Open
janjust wants to merge 2 commits intomainfrom
main-issue13741
Open

Main issue13741#9
janjust wants to merge 2 commits intomainfrom
main-issue13741

Conversation

@janjust
Copy link
Owner

@janjust janjust commented Feb 24, 2026

No description provided.

@github-actions
Copy link

Hello! The Git Commit Checker CI bot found a few problems with this PR:

2aa5042: address issue 13741

  • check_signed_off: does not contain a valid Signed-off-by line

Please fix these problems and, if necessary, force-push new commits back up to the PR branch. Thanks!

MPI-5 section 20.4 requires that all optional predefined datatype handles
are always present in mpi.h, and that unavailable types are detected at
runtime via MPI_Type_size returning MPI_UNDEFINED.

Two issues are fixed:

1. mpi.h.in: remove #if OMPI_HAVE_FORTRAN_* guards around the 24 optional
   Fortran predefined datatype #define macros (MPI_LOGICAL1/2/4/8/16,
   MPI_INTEGER1/2/4/8/16, MPI_REAL2/4/8/16, MPI_COMPLEX4/8/16/32,
   MPI_DOUBLE_COMPLEX). The underlying global variables are always defined
   (either as a real type or via OMPI_DATATYPE_INIT_UNAVAILABLE), so the
   handles can safely be unconditional.

2. MPI_Type_size / MPI_Type_size_x: add an opal_datatype_is_valid() check
   so that types initialized with OPAL_DATATYPE_FLAG_UNAVAILABLE return
   MPI_UNDEFINED instead of 0.

Fixes: open-mpi#13741
Signed-off-by: Tomislav Janjusic <tomislavj@nvidia.com>
Adds a new test that verifies MPI_Type_size behavior for all 24 optional
Fortran predefined datatypes (MPI_LOGICAL1/2/4/8/16, MPI_INTEGER1/2/4/8/16,
MPI_REAL2/4/8/16, MPI_COMPLEX4/8/16/32, MPI_DOUBLE_COMPLEX) as required
by MPI-5 section 20.4.

For each type, the test calls MPI_Type_size and asserts:
- the correct size (OMPI_SIZEOF_FORTRAN_*) when the type is available
  (OMPI_HAVE_FORTRAN_* is set), or
- MPI_UNDEFINED when the type is not available on the platform.

The test is integrated into the existing test/datatype make check suite.

Signed-off-by: Tomislav Janjusic <tomislavj@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant