Skip to content

Unexpected result from MPI_TYPE_GET_VALUE_INDEX #13458

@dalcinl

Description

@dalcinl

I'm working on updating mpi4py to automatically build with all the MPI 4.0/5.1 features added to ompi@main.

I'm getting this unexpected result,

>>> from mpi4py import MPI
>>> MPI.Datatype.Get_value_index(MPI.FLOAT, MPI.FLOAT).Get_name()
'MPI_2REAL'

My expectation was MPI_DATATYPE_NULL, and that's what I wrote in my tests.
I hope we all agree that MPI_2REAL is a very awkward thing from F77 times.

Funny enough, look at the following

>>> from mpi4py import MPI
>>> MPI.Datatype.Get_value_index(MPI.REAL, MPI.REAL).Get_name()
'MPI_DATATYPE_NULL'

The MPI standard says: Integer types supported by the underlying compiler are acceptable index types. MPI 5.0 pp 230.

cc @hppritcha

Metadata

Metadata

Assignees

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