C Binding Issues
Up: Language Binding Next: Processes Previous: Fortran 77 Binding Issues
We use the ANSI C declaration format. All MPI names have an MPI_ prefix, defined constants are in all capital letters, and defined types and functions have one capital letter after the prefix. Programs must not declare variables or functions with names beginning with the prefix, MPI_. This is mandated to avoid possible name collisions.
The definition of named constants, function prototypes, and type definitions must be supplied in an include file mpi.h.
Almost all C functions return an error code. The successful return code will be MPI_SUCCESS, but failure return codes are implementation dependent. A few C functions do not return values, so that they can be implemented as macros.
Type declarations are provided for handles to each category of opaque objects. Either a pointer or an integer type is used.
Array arguments are indexed from zero.
Logical flags are integers with value 0 meaning ``false'' and a non-zero value meaning ``true.''
Choice arguments are pointers of type void*.
Address arguments are of MPI defined type MPI_Aint. This is defined to be an int of the size needed to hold any valid address on the target architecture.
All named MPI constants can be used in initialization expressions or assignments like C constants.
Up: Language Binding Next: Processes Previous: Fortran 77 Binding Issues
Return to MPI Standard Index
Return to MPI home page