Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/pnetcdf/_utils.pyx
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).

Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ _nptonctype = {'S1' : NC_CHAR_C,
'f4' : NC_FLOAT_C,
'f8' : NC_DOUBLE_C}

_nptompitype = {'S1' : MPI_CHAR,
'i1' : MPI_BYTE,
'u1' : MPI_UNSIGNED_CHAR,
'i2' : MPI_SHORT,
'u2' : MPI_UNSIGNED_SHORT,
'i4' : MPI_INT,
'u4' : MPI_UNSIGNED,
'i8' : MPI_LONG_LONG,
'u8' : MPI_UNSIGNED_LONG_LONG,
'f4' : MPI_FLOAT,
'f8' : MPI_DOUBLE}
_nptompitype = {'S1' : MPI.CHAR,
'i1' : MPI.BYTE,
'u1' : MPI.UNSIGNED_CHAR,
'i2' : MPI.SHORT,
'u2' : MPI.UNSIGNED_SHORT,
'i4' : MPI.INT,
'u4' : MPI.UNSIGNED,
'i8' : MPI.LONG_LONG,
'u8' : MPI.UNSIGNED_LONG_LONG,
'f4' : MPI.FLOAT,
'f8' : MPI.DOUBLE}


"""_nptompitype = {'S1' : MPI_CHAR,
Expand Down