Lisandro Dalcin <[email protected]> writes: > On 22 March 2018 at 15:31, Matthew Knepley <[email protected]> wrote: >> On Thu, Mar 22, 2018 at 8:28 AM, Jed Brown <[email protected]> wrote: >>> >> >> What I imagined was just mapping each Petsc typedef (do we list them all >> anywhere), >> to an MPI type, creating those that are missing (as we do for MPIU_INT). Is >> there more >> to it than that? >> > > We have that (I mean, each PETSc typedef). What we are somehow missing > is the mapping plain C 'int' -> MPI_INT. That's important for binary > I/O with non-PETSc formats (e.g. GMSH).
There are a few public interfaces that would need to change to accept MPI_Dataype, then update a bunch of code that uses it. Might only take a couple hours. My guess is that PetscBag will be the most subtle (and it needs to remain compatible). One structural usage difference would be that PetscDataType can be used in a switch statement.
