Procedure Specification



next up previous contents
Next: Semantic Terms Up: MPI Conventions and Previous: Document Notation

Procedure Specification

MPI procedures are specified using a language independent notation. The arguments of procedure calls are marked as , or . The meanings of these are:

IN OUT INOUT procedure specification arguments

There is one special case - if an argument is a handle to an opaque object (defined in Section gif), and the object is updated by the procedure call, then the argument is marked . It is marked this way even though the handle itself is not modified - we use the attribute to denote that what the handle references is updated.

The definition of MPI tries to avoid, to the largest possible extent, the use of arguments, because such use is error-prone, especially for scalar arguments.

A common occurrence for MPI functions is an argument that is used as by some processes and by other processes. Such an argument is, syntactically, an argument and is marked as such, although, semantically, it is not used in one call both for input and for output.

Another frequent situation arises when an argument value is needed only by a subset of the processes. When an argument is not significant at a process then an arbitrary value can be passed as the argument.

Unless specified otherwise, an argument of type or type cannot be aliased with any other argument passed to an MPI procedure. An example of argument aliasing in C appears below. If we define a C procedure like this,

void copyIntBuffer( int *pin, int *pout, int len )
{   int i;
    for (i=0; i<len; ++i) *pout++ = *pin++;
}
then a call to it in the following code fragment has aliased arguments. aliased arguments
int a[10];
copyIntBuffer( a, a+3, 7);
Although the C language allows this, such usage of MPI procedures is forbidden unless otherwise specified. Note that Fortran prohibits aliasing of arguments.

All MPI functions are first specified in the language-independent notation. Immediately below this, the ANSI C version of the function is shown, and below this, a version of the same function in Fortran 77.



next up previous contents
Next: Semantic Terms Up: MPI Conventions and Previous: Document Notation



Jack Dongarra
Fri Sep 1 06:16:55 EDT 1995