petsc-3.10.5 2019-03-28
Report Typos and Errors

Converts

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 relys 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