NCAR / ParallelIO

A high-level Parallel I/O Library for structured grid applications
Apache License 2.0
134 stars 52 forks source link

MPI_DATATYPE_NULL in mpi distributions #1945

Open jedwards4b opened 1 year ago

jedwards4b commented 1 year ago

In pio_internal.h we have a workaround for mpi libraries that do not (IMHO) correctly interpret the MPI standard with respect to the MPI_DATATYPE_NULL variable and generate errors when this datatype is passed to the library even when the associated data count is 0. If this is not the intent of MPI_DATATYPE_NULL then I have no idea what is. The code in pio_internal.h works around the problem for openmpi where we lost an argument here. And the HPE/SGI mpt implementation (pointless to argue, no issue was filed).

This recently came up again as an ESMF issue. when MPICH 4.0.0 is used. An issue in the mpich repo indicates that the mpich developers fixed this issue in 4.0.1. Do we add another exception in pio_internal.h or just use our workaround all the time. @edwardhartnett?

edwardhartnett commented 1 year ago

I would say just use the workaround every time, documenting fully...