Skip to content

Conversation

@wkliao
Copy link
Member

@wkliao wkliao commented Apr 5, 2025

We tested PnetCDF-Python using MPICH only.
This PR adds support for using OpenMPI.

Note some data objects defined in mpich are different between MPICH and OpenMPI.
For example, MPI_CHAR is a C constant in MPICH and enurm in OpenMPI.
MPI_Comm is an int in MPICH and struct pointer in OpenMPI.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix the OpenMPI compatibility issue. mpi4py.MPI are Python-level objects that safely wrap the underlying MPI_Datatype, regardless of whether it is an integer (as in MPICH) or a pointer (as in OpenMPI).

numpy.import_array()


ctypedef MPI.Datatype Datatype
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change necessary to fix the OpenMPI issue? this should just create an alias

@wkliao wkliao merged commit 1514f45 into Parallel-NetCDF:main Apr 6, 2025
4 checks passed
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.

2 participants