Fortran 77 Binding Issues


Up: Language Binding Next: C Binding Issues Previous: Language Binding

All MPI names have an MPI_ prefix, and all characters are capitals. Programs must not declare variables or functions with names beginning with the prefix, MPI_. This is mandated to avoid possible name collisions.

All MPI Fortran subroutines have a return code in the last argument. A few MPI operations are functions, which do not have the return code argument. The return code value for successful completion is MPI_SUCCESS. Other error codes are implementation dependent; see Chapter MPI Environmental Management .

Handles are represented in Fortran as INTEGERs. Binary-valued variables are of type LOGICAL.

Array arguments are indexed from one.

Unless explicitly stated, the MPI F77 binding is consistent with ANSI standard Fortran 77. There are several points where this standard diverges from the ANSI Fortran 77 standard. These exceptions are consistent with common practice in the Fortran community. In particular:



double precision a 
         integer b 
         ... 
         call MPI_send(a,...) 
         call MPI_send(b,...) 

Figure 1: An example of calling a routine with mismatched formal and actual arguments.

All MPI named constants can be used wherever an entity declared with the PARAMETER attribute can be used in Fortran. There is one exception to this rule: the MPI constant MPI_BOTTOM (section Address and extent functions ) can only be used as a buffer argument.



Up: Language Binding Next: C Binding Issues Previous: Language Binding


Return to MPI Standard Index
Return to MPI home page