Skip to content

Support OpenMPI #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 6, 2025
Merged

Support OpenMPI #62

merged 6 commits into from
Apr 6, 2025

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).

@@ -28,7 +28,6 @@ cimport numpy
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