PETSc version 3.17.4
Fix/Edit manual page

# PetscMPIFortranDatatypeToC

Converts a MPI_Fint that contains a Fortran MPI_Datatype to its C MPI_Datatype equivalent

### Synopsis

    PetscErrorCode PetscMPIFortranDatatypeToC(MPI_Fint unit,MPI_Datatype *dtype)

Not Collective

### Input Parameter

| unit | - The Fortran MPI_Datatype

### Output Parameter

| dtype | - the corresponding C MPI_Datatype

### Developer Notes

The MPI documentation in multiple places says that one can never us Fortran MPI_Datatypes in C (or vis-versa) but this is problematic since users could never call C routines from Fortran that have MPI_Datatype arguments. Jed states that the Fortran MPI_Datatypes will always be available in C if the MPI was built to support Fortran. This function relies on this.

### Level

developer

### Location

src/sys/f90-src/f90_cwrap.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages