\chapter{Language Binding}
\label{sec:lang}
\label{chap:lang}
\label{chap:binding}
%\footnotetext[1]{Version as of October 25, 1993}

\section{Introduction}
In this section we summarize the specific bindings for both Fortran and C.  We
present first the C bindings, then the Fortran bindings.  Listings are
alphabetical within chapter.

\section{Defined Constants for C and Fortran}

These are required defined constants, to be defined in the files {\tt mpi.h}
(for C) and {\tt mpif.h} (for Fortran).

\begin{verbatim}
/* return codes (both C and Fortran) */
MPI_SUCCESS
MPI_ERR_BUFFER
MPI_ERR_COUNT
MPI_ERR_TYPE
MPI_ERR_TAG
MPI_ERR_COMM
MPI_ERR_RANK
MPI_ERR_REQUEST
MPI_ERR_ROOT
MPI_ERR_GROUP
MPI_ERR_OP
MPI_ERR_TOPOLOGY
MPI_ERR_DIMS
MPI_ERR_ARG
MPI_ERR_UNKNOWN
MPI_ERR_TRUNCATE
MPI_ERR_OTHER
MPI_ERR_INTERN
MPI_PENDING
MPI_ERR_IN_STATUS
MPI_ERR_LASTCODE

/* assorted constants (both C and Fortran) */
MPI_BOTTOM
MPI_PROC_NULL
MPI_ANY_SOURCE
MPI_ANY_TAG
MPI_UNDEFINED
MPI_BSEND_OVERHEAD
MPI_KEYVAL_INVALID

/* status size and reserved index values (Fortran) */
MPI_STATUS_SIZE
MPI_SOURCE
MPI_TAG
MPI_ERROR

/* Error-handling specifiers (C and Fortran) */
MPI_ERRORS_ARE_FATAL
MPI_ERRORS_RETURN

/* Maximum sizes for strings */
MPI_MAX_PROCESSOR_NAME
MPI_MAX_ERROR_STRING

/* elementary datatypes (C) */
MPI_CHAR
MPI_SHORT
MPI_INT		
MPI_LONG	
MPI_UNSIGNED_CHAR
MPI_UNSIGNED_SHORT
MPI_UNSIGNED
MPI_UNSIGNED_LONG
MPI_FLOAT	
MPI_DOUBLE	
MPI_LONG_DOUBLE
MPI_BYTE	
MPI_PACKED



/* elementary datatypes (Fortran) */
MPI_INTEGER
MPI_REAL
MPI_DOUBLE_PRECISION
MPI_COMPLEX
MPI_DOUBLE_COMPLEX
MPI_LOGICAL
MPI_CHARACTER
MPI_BYTE
MPI_PACKED

/* datatypes for reduction functions (C) */
MPI_FLOAT_INT
MPI_DOUBLE_INT
MPI_LONG_INT
MPI_2INT
MPI_SHORT_INT
MPI_LONG_DOUBLE_INT

/* datatypes for reduction functions (Fortran) */
MPI_2REAL
MPI_2DOUBLE_PRECISION
MPI_2INTEGER

/* optional datatypes (Fortran) */
MPI_INTEGER1
MPI_INTEGER2
MPI_INTEGER4
MPI_REAL2
MPI_REAL4
MPI_REAL8

/* optional datatypes (C) */
MPI_LONG_LONG_INT

/* special datatypes for constructing derived datatypes
MPI_UB
MPI_LB

/* reserved communicators (C and Fortran) */
MPI_COMM_WORLD
MPI_COMM_SELF

/* results of communicator and group comparisons */

MPI_IDENT
MPI_CONGRUENT
MPI_SIMILAR
MPI_UNEQUAL

/* environmental inquiry keys (C and Fortran) */
MPI_TAG_UB
MPI_IO
MPI_HOST
MPI_WTIME_IS_GLOBAL

/* collective operations (C and Fortran) */
MPI_MAX
MPI_MIN
MPI_SUM
MPI_PROD
MPI_MAXLOC
MPI_MINLOC
MPI_BAND
MPI_BOR
MPI_BXOR
MPI_LAND
MPI_LOR
MPI_LXOR

/* Null handles */
MPI_GROUP_NULL
MPI_COMM_NULL
MPI_DATATYPE_NULL
MPI_REQUEST_NULL
MPI_OP_NULL
MPI_ERRHANDLER_NULL

/* Empty group */
MPI_GROUP_EMPTY

/* topologies (C and Fortran) */
MPI_GRAPH
MPI_CART

\end{verbatim}

The following are defined C type definitions, also included in the file {\tt
mpi.h}.

\begin{verbatim}
/* opaque types (C) */
MPI_Aint
MPI_Status

/* handles to assorted structures (C) */
MPI_Group
MPI_Comm
MPI_Datatype
MPI_Request
MPI_Op

/* prototypes for user-defined functions (C) */
typedef int  MPI_Copy_function(MPI_Comm oldcomm, int keyval,
                    void *extra_state, void *attribute_val_in,
                    void *attribute_val_out, int *flag);
typedef int  MPI_Delete_function(MPI_Comm comm, int keyval,
                          void *attribute_val, void *extra_state)
typedef void MPI_Handler_function(MPI_Comm *, int *, ...);
typedef void MPI_User_function( void *invec, void *inoutvec, int *len,
                      MPI_Datatype *datatype);
\end{verbatim}

For Fortran, here are examples of how each of the user-defined functions should
be declared.

The user-function argument to \func{MPI\_OP\_CREATE} should be declared
like this:
\begin{verbatim}
FUNCTION USER_FUNCTION( INVEC(*), INOUTVEC(*), LEN, TYPE)
<type> INVEC(LEN), INOUTVEC(LEN)
 INTEGER LEN, TYPE
\end{verbatim}

The copy-function argument to \func{MPI\_KEYVAL\_CREATE} should be declared
like this:
\begin{verbatim}
 PROCEDURE COPY_FUNCTION(OLDCOMM, KEYVAL, EXTRA_STATE,
               ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERR)
 INTEGER OLDCOMM, KEYVAL, EXTRA_STATE, ATTRIBUTE_VAL_IN,
         ATTRIBUTE_VAL_OUT, IERR
 LOGICAL FLAG
\end{verbatim}

The delete-function argument to \func{MPI\_KEYVAL\_CREATE} should be declared
like this:
\begin{verbatim}
PROCEDURE DELETE_FUNCTION(COMM, KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, IERR)
 INTEGER COMM, KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, IERR
\end{verbatim}

\def\mpibind#1{{\raggedright \hangindent 7em\hangafter=1\tt int #1 \par \vspace{0.1in}}}

\section{C bindings for Point-to-Point Communication}

These are presented here in the order of their appearance in the chapter.

% \mpibind{MPI\_send(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, MPI\_Tag~tag, MPI\_Comm~comm)}

\mpibind{MPI\_Send(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm)}
\mpibind{MPI\_Recv(void*~buf, int~count, MPI\_Datatype~datatype, int~source, int~tag, MPI\_Comm~comm, MPI\_Status~*status)}
\mpibind{MPI\_Get\_count(MPI\_Status~*status, MPI\_Datatype~datatype, int~*count)}
\mpibind{MPI\_Bsend(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm)}
\mpibind{MPI\_Ssend(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm)}
\mpibind{MPI\_Rsend(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm)}
\mpibind{MPI\_Buffer\_attach( void*~buffer, int~size)}
\mpibind{MPI\_Buffer\_detach( void*~buffer, int*~size)}
\mpibind{MPI\_Isend(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Ibsend(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Issend(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Irsend(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Irecv(void*~buf, int~count, MPI\_Datatype~datatype, int~source, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Wait(MPI\_Request~*request, MPI\_Status~*status)}
\mpibind{MPI\_Test(MPI\_Request~*request, int~*flag, MPI\_Status~*status)}
\mpibind{MPI\_Request\_free(MPI\_Request~*request)}
\mpibind{MPI\_Waitany(int~count, MPI\_Request~*array\_of\_requests, int~*index, MPI\_Status~*status)}
\mpibind{MPI\_Testany(int~count, MPI\_Request~*array\_of\_requests, int~*index, int~*flag, MPI\_Status~*status)}
\mpibind{MPI\_Waitall(int~count, MPI\_Request~*array\_of\_requests, MPI\_Status~*array\_of\_statuses)}
\mpibind{MPI\_Testall(int~count, MPI\_Request~*array\_of\_requests, int~*flag, MPI\_Status~*array\_of\_statuses)}
\mpibind{MPI\_Waitsome(int~incount, MPI\_Request~*array\_of\_requests, int~*outcount, int~*array\_of\_indices, MPI\_Status~*array\_of\_statuses)}
\mpibind{MPI\_Testsome(int~incount, MPI\_Request~*array\_of\_requests, int~*outcount, int~*array\_of\_indices, MPI\_Status~*array\_of\_statuses)}
\mpibind{MPI\_Iprobe(int~source, int~tag, MPI\_Comm~comm, int~*flag, MPI\_Status~*status)}
\mpibind{MPI\_Probe(int~source, int~tag, MPI\_Comm~comm, MPI\_Status~*status)}
\mpibind{MPI\_Cancel(MPI\_Request~*request)}
\mpibind{MPI\_Test\_cancelled(MPI\_Status~*status, int~*flag)}
\mpibind{MPI\_Send\_init(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Bsend\_init(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Ssend\_init(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Rsend\_init(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Recv\_init(void*~buf, int~count, MPI\_Datatype~datatype, int~source, int~tag, MPI\_Comm~comm, MPI\_Request~*request)}
\mpibind{MPI\_Start(MPI\_Request~*request)}
\mpibind{MPI\_Startall(int~count, MPI\_Request~*array\_of\_requests)}
\mpibind{MPI\_Sendrecv(void~*sendbuf, int~sendcount, MPI\_Datatype~sendtype, int~dest, int~sendtag, void~*recvbuf, int~recvcount, MPI\_Datatype~recvtype, int~source, MPI\_Datatype~recvtag, MPI\_Comm~comm, MPI\_Status~*status)}
\mpibind{MPI\_Sendrecv\_replace(void*~buf, int~count, MPI\_Datatype~datatype, int~dest, int~sendtag, int~source, int~recvtag, MPI\_Comm~comm, MPI\_Status~*status)}
\mpibind{MPI\_Type\_contiguous(int~count, MPI\_Datatype~oldtype, MPI\_Datatype~*newtype)}
\mpibind{MPI\_Type\_vector(int~count, int~blocklength, int~stride, MPI\_Datatype~oldtype, MPI\_Datatype~*newtype)}
\mpibind{MPI\_Type\_hvector(int~count, int~blocklength, MPI\_Aint~stride, MPI\_Datatype~oldtype, MPI\_Datatype~*newtype)}
\mpibind{MPI\_Type\_indexed(int~count, int~*array\_of\_blocklengths, int~*array\_of\_displacements, MPI\_Datatype~oldtype, MPI\_Datatype~*newtype)}
\mpibind{MPI\_Type\_hindexed(int~count, int~*array\_of\_blocklengths, MPI\_Aint~*array\_of\_displacements, MPI\_Datatype~oldtype, MPI\_Datatype~*newtype)}
\mpibind{MPI\_Type\_struct(int~count, int~*array\_of\_blocklengths, MPI\_Aint~*array\_of\_displacements, MPI\_Datatype~*array\_of\_types, MPI\_Datatype~*newtype)}
\mpibind{MPI\_Address(void*~location, MPI\_Aint~*address)}
\mpibind{MPI\_Type\_extent(MPI\_Datatype~datatype, MPI\_Aint~*extent)}
\mpibind{MPI\_Type\_size(MPI\_Datatype~datatype, int~*size)}
\mpibind{MPI\_Type\_lb(MPI\_Datatype~datatype, MPI\_Aint*~displacement)}
\mpibind{MPI\_Type\_ub(MPI\_Datatype~datatype, MPI\_Aint*~displacement)}
\mpibind{MPI\_Type\_commit(MPI\_Datatype~*datatype)}
\mpibind{MPI\_Type\_free(MPI\_Datatype~*datatype)}
\mpibind{MPI\_Get\_elements(MPI\_Status~*status, MPI\_Datatype~datatype, int~*count)}
\snir
\mpibind{MPI\_Pack(void*~inbuf, int~incount, MPI\_Datatype~datatype, void~*outbuf, int~outsize, int~*position,  MPI\_Comm~comm)}
\rins
\mpibind{MPI\_Unpack(void*~inbuf, int~insize, int~*position, void~*outbuf, int~outcount, MPI\_Datatype~datatype, MPI\_Comm~comm)}
\mpibind{MPI\_Pack\_size(int~incount, MPI\_Datatype~datatype, MPI\_Comm~comm, int~*size)}

\section{C Bindings for Collective Communication}

\mpibind{MPI\_Barrier(MPI\_Comm~comm )}
\mpibind{MPI\_Bcast(void*~buffer, int~count, MPI\_Datatype~datatype, int~root, MPI\_Comm~comm )}
\mpibind{MPI\_Gather(void*~sendbuf, int~sendcount, MPI\_Datatype~sendtype, void*~recvbuf, int~recvcount, MPI\_Datatype~recvtype, int~root, MPI\_Comm~comm) }
\mpibind{MPI\_Gatherv(void*~sendbuf, int~sendcount, MPI\_Datatype~sendtype, void*~recvbuf, int~*recvcounts, int~*displs, MPI\_Datatype~recvtype, int~root, MPI\_Comm~comm) }
\mpibind{MPI\_Scatter(void*~sendbuf, int~sendcount, MPI\_Datatype~sendtype, void*~recvbuf, int~recvcount, MPI\_Datatype~recvtype, int~root, MPI\_Comm~comm)}
\mpibind{MPI\_Scatterv(void*~sendbuf, int~*sendcounts, int~*displs, MPI\_Datatype~sendtype, void*~recvbuf, int~recvcount, MPI\_Datatype~recvtype, int~root, MPI\_Comm~comm)}
\mpibind{MPI\_Allgather(void*~sendbuf, int~sendcount, MPI\_Datatype~sendtype, void*~recvbuf, int~recvcount, MPI\_Datatype~recvtype, MPI\_Comm~comm)}
\mpibind{MPI\_Allgatherv(void*~sendbuf, int~sendcount, MPI\_Datatype~sendtype, void*~recvbuf, int~*recvcounts, int~*displs, MPI\_Datatype~recvtype, MPI\_Comm~comm)}
\mpibind{MPI\_Alltoall(void*~sendbuf, int~sendcount, MPI\_Datatype~sendtype, void*~recvbuf, int~recvcount, MPI\_Datatype~recvtype, MPI\_Comm~comm)}
\mpibind{MPI\_Alltoallv(void*~sendbuf, int~*sendcounts, int~*sdispls, MPI\_Datatype~sendtype, void*~recvbuf, int~*recvcounts, int~*rdispls, MPI\_Datatype~recvtype, MPI\_Comm~comm)}
\mpibind{MPI\_Reduce(void*~sendbuf, void*~recvbuf, int~count, MPI\_Datatype~datatype, MPI\_Op~op, int~root, MPI\_Comm~comm)}
\mpibind{MPI\_Op\_create(MPI\_User\_function~*function, int~commute, MPI\_Op~*op)}
\mpibind{MPI\_Op\_free( MPI\_Op~*op)}
\mpibind{MPI\_Allreduce(void*~sendbuf, void*~recvbuf, int~count, MPI\_Datatype~datatype, MPI\_Op~op, MPI\_Comm~comm)}
\mpibind{MPI\_Reduce\_scatter(void*~sendbuf, void*~recvbuf, int~*recvcounts, MPI\_Datatype~datatype, MPI\_Op~op, MPI\_Comm~comm)}
\mpibind{MPI\_Scan(void*~sendbuf, void*~recvbuf, int~count, MPI\_Datatype~datatype, MPI\_Op~op, MPI\_Comm~comm )}

\section{C Bindings for Groups, Contexts, and Communicators}

\mpibind{MPI\_Group\_size(MPI\_Group~group, int~*size)}
\mpibind{MPI\_Group\_rank(MPI\_Group~group, int~*rank)}
\mpibind{MPI\_Group\_translate\_ranks (MPI\_Group~group1, int~n, int~*ranks1, MPI\_Group~group2, int~*ranks2)}
\mpibind{MPI\_Group\_compare(MPI\_Group~group1,MPI\_Group~group2,~int~*result)}
\mpibind{MPI\_Comm\_group(MPI\_Comm~comm, MPI\_Group~*group)}
\mpibind{MPI\_Group\_union(MPI\_Group~group1, MPI\_Group~group2, MPI\_Group~*newgroup)}
\mpibind{MPI\_Group\_intersection(MPI\_Group~group1, MPI\_Group~group2, MPI\_Group~*newgroup)}
\mpibind{MPI\_Group\_difference(MPI\_Group~group1, MPI\_Group~group2, MPI\_Group~*newgroup)}
\mpibind{MPI\_Group\_incl(MPI\_Group~group, int~n, int~*ranks, MPI\_Group~*newgroup)}
\mpibind{MPI\_Group\_excl(MPI\_Group~group, int~n, int~*ranks, MPI\_Group~*newgroup)}
\mpibind{MPI\_Group\_range\_incl(MPI\_Group~group, int~n, int~ranges[][3], MPI\_Group~*newgroup)}
\mpibind{MPI\_Group\_range\_excl(MPI\_Group~group, int~n, int~ranges[][3], MPI\_Group~*newgroup)}
\mpibind{MPI\_Group\_free(MPI\_Group~*group)}
\mpibind{MPI\_Comm\_size(MPI\_Comm~comm, int~*size)}
\mpibind{MPI\_Comm\_rank(MPI\_Comm~comm, int~*rank)}
\mpibind{MPI\_Comm\_compare(MPI\_Comm~comm1,MPI\_Comm~comm2,~int~*result)}
\mpibind{MPI\_Comm\_dup(MPI\_Comm~comm, MPI\_Comm~*newcomm)}
\mpibind{MPI\_Comm\_create(MPI\_Comm~comm, MPI\_Group~group, MPI\_Comm~*newcomm)}
\mpibind{MPI\_Comm\_split(MPI\_Comm~comm, int~color, int~key, MPI\_Comm~*newcomm)}
\mpibind{MPI\_Comm\_free(MPI\_Comm~*comm)}
\mpibind{MPI\_Comm\_test\_inter(MPI\_Comm~comm, int~*flag)}
\mpibind{MPI\_Comm\_remote\_size(MPI\_Comm~comm, int~*size)}
\mpibind{MPI\_Comm\_remote\_group(MPI\_Comm~comm, MPI\_Group~*group)}
\mpibind{MPI\_Intercomm\_create(MPI\_Comm~local\_comm, int~local\_leader, MPI\_Comm~peer\_comm, int~remote\_leader, int~tag, MPI\_Comm~*newintercomm)}
\mpibind{MPI\_Intercomm\_merge(MPI\_Comm~intercomm, int~high, MPI\_Comm~*newintracomm)}
\mpibind{MPI\_Keyval\_create(MPI\_Copy\_function *copy\_fn, MPI\_Delete\_function *delete\_fn, int~*keyval, void*~extra\_state)}
\mpibind{MPI\_Keyval\_free(int~*keyval)}
\mpibind{MPI\_Attr\_put(MPI\_Comm~comm, int~keyval, void*~attribute\_val)}
\mpibind{MPI\_Attr\_get(MPI\_Comm~comm, int~keyval, void*~attribute\_val, int~*flag)}
\mpibind{MPI\_Attr\_delete(MPI\_Comm~comm, int~keyval)}


\section{C Bindings for Process Topologies}

\mpibind{MPI\_Cart\_create(MPI\_Comm~comm\_old, int~ndims, int~*dims, int~*periods, int~reorder, MPI\_Comm~*comm\_cart)}
\mpibind{MPI\_Dims\_create(int~nnodes, int~ndims, int~*dims)}
\mpibind{MPI\_Graph\_create(MPI\_Comm~comm\_old, int~nnodes, int~*index, int~*edges, int~reorder, MPI\_Comm~*comm\_graph)}
\mpibind{MPI\_Topo\_test(MPI\_Comm~comm, int~*status)}
\mpibind{MPI\_Graphdims\_get(MPI\_Comm~comm, int~*nnodes, int~*nedges)}
\mpibind{MPI\_Graph\_get(MPI\_Comm~comm, int~maxindex, int~maxedges, int~*index, int~*edges)}
\mpibind{MPI\_Cartdim\_get(MPI\_Comm~comm, int~*ndims)}
\mpibind{MPI\_Cart\_get(MPI\_Comm~comm, int~maxdims, int~*dims, int~*periods, int~*coords)}
\mpibind{MPI\_Cart\_rank(MPI\_Comm~comm, int~*coords, int~*rank)}
\mpibind{MPI\_Cart\_coords(MPI\_Comm~comm, int~rank, int~maxdims, int~*coords)}
\mpibind{MPI\_Graph\_neighbors\_count(MPI\_Comm~comm, int~rank, int~*nneighbors)}
\mpibind{MPI\_Graph\_neighbors(MPI\_Comm~comm, int~rank, int~maxneighbors, int~*neighbors)}
\mpibind{MPI\_Cart\_shift(MPI\_Comm~comm, int~direction, int~disp, int~*rank\_source, int~*rank\_dest)}
\mpibind{MPI\_Cart\_sub(MPI\_Comm~comm, int~*remain\_dims, MPI\_Comm~*newcomm)}
\mpibind{MPI\_Cart\_map(MPI\_Comm~comm, int~ndims, int~*dims, int~*periods, int~*newrank)}
\mpibind{MPI\_Graph\_map(MPI\_Comm~comm, int~nnodes, int~*index, int~*edges, int~*newrank)}


\section{C bindings for Environmental Inquiry}

\def\mpibindA#1{{\raggedright \hangindent 7em\hangafter=1\tt #1 \par \vspace{0.1in}}}
\mpibind{MPI\_Get\_processor\_name(char~*name, int~*resultlen)}
\mpibind{MPI\_Errhandler\_create(MPI\_Handler\_function~*function, MPI\_Errhandler~*errhandler)}
\mpibind{MPI\_Errhandler\_set(MPI\_Comm~comm, MPI\_Errhandler~errhandler)}
\mpibind{MPI\_Errhandler\_get(MPI\_Comm~comm, MPI\_Errhandler~*errhandler)}
\mpibind{MPI\_Errhandler\_free(MPI\_Errhandler~*errhandler)}
\mpibind{MPI\_Error\_string(int~errorcode, char~*string, int~*resultlen)}
\mpibind{MPI\_Error\_class(int~errorcode, int~*errorclass)}
\mpibind{double MPI\_Wtime(void)}
\mpibind{double MPI\_Wtick(void)}
\mpibind{MPI\_Init(int~*argc, char~***argv)}
\mpibind{MPI\_Finalize(void)}
\mpibind{MPI\_Initialized(int~*flag)}
\mpibind{MPI\_Abort(MPI\_Comm~comm, int~errorcode)}


\section{C Bindings for Profiling}

\mpibind{MPI\_Pcontrol(const~int~level, \ldots)}

%\let \mpifbind=\mpibind

\def\mpifbind#1{{\raggedright \hangindent 7em\hangafter=1\tt #1 \par \vspace{0.1in}}}

\def\fargs{\\\advance\leftskip 2em}

\section{Fortran Bindings for Point-to-Point Communication}

% \mpifbind{mpi\_send(start, count, datatype, dest, tag, comm, rc)\fargs real start(*) \\ integer count, datatype, dest, tag, comm, rc }

%\def\mpifbind#1{{\raggedright \hangindent 7em\hangafter=1\tt #1 \par \vspace{0.1in}}}

\mpifbind{MPI\_SEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, IERROR}
\mpifbind{MPI\_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_GET\_COUNT(STATUS, DATATYPE, COUNT, IERROR)\fargs INTEGER  STATUS(MPI\_STATUS\_SIZE), DATATYPE, COUNT, IERROR}
\mpifbind{MPI\_BSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, IERROR}
\mpifbind{MPI\_SSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, IERROR}
\mpifbind{MPI\_RSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, IERROR}
\mpifbind{MPI\_BUFFER\_ATTACH( BUFFER, SIZE, IERROR)\fargs <type> BUFFER(*) \\ INTEGER  SIZE, IERROR}
\mpifbind{MPI\_BUFFER\_DETACH( BUFFER, SIZE, IERROR)\fargs <type> BUFFER(*) \\ INTEGER  SIZE, IERROR}
\mpifbind{MPI\_ISEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_IBSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_ISSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_IRSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_IRECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR)\fargs <type> BUF(*) \\ INTEGER  COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_WAIT(REQUEST, STATUS, IERROR)\fargs INTEGER  REQUEST, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_TEST(REQUEST, FLAG, STATUS, IERROR)\fargs LOGICAL  FLAG \\ INTEGER  REQUEST, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_REQUEST\_FREE(REQUEST, IERROR)\fargs INTEGER  REQUEST, IERROR}
\mpifbind{MPI\_WAITANY(COUNT, ARRAY\_OF\_REQUESTS, INDEX, STATUS, IERROR)\fargs INTEGER  COUNT, ARRAY\_OF\_REQUESTS(*), INDEX, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_TESTANY(COUNT, ARRAY\_OF\_REQUESTS, INDEX, FLAG, STATUS, IERROR)\fargs LOGICAL  FLAG \\ INTEGER  COUNT, ARRAY\_OF\_REQUESTS(*), INDEX, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_WAITALL(COUNT, ARRAY\_OF\_REQUESTS, ARRAY\_OF\_STATUSES, IERROR)\fargs INTEGER  COUNT, ARRAY\_OF\_REQUESTS(*), ARRAY\_OF\_STATUSES(MPI\_STATUS\_SIZE,*), IERROR}
\mpifbind{MPI\_TESTALL(COUNT, ARRAY\_OF\_REQUESTS, FLAG, ARRAY\_OF\_STATUSES, IERROR)\fargs LOGICAL  FLAG \\ INTEGER  COUNT, ARRAY\_OF\_REQUESTS(*), ARRAY\_OF\_STATUSES(MPI\_STATUS\_SIZE,*), IERROR}
\mpifbind{MPI\_WAITSOME(INCOUNT, ARRAY\_OF\_REQUESTS, OUTCOUNT, ARRAY\_OF\_INDICES, ARRAY\_OF\_STATUSES, IERROR)\fargs INTEGER INCOUNT, ARRAY\_OF\_REQUESTS(*), OUTCOUNT, ARRAY\_OF\_INDICES(*), ARRAY\_OF\_STATUSES(MPI\_STATUS\_SIZE,*), IERROR}
\mpifbind{MPI\_TESTSOME(INCOUNT, ARRAY\_OF\_REQUESTS, OUTCOUNT, ARRAY\_OF\_INDICES, ARRAY\_OF\_STATUSES, IERROR)\fargs INTEGER INCOUNT, ARRAY\_OF\_REQUESTS(*), OUTCOUNT, ARRAY\_OF\_INDICES(*), ARRAY\_OF\_STATUSES(MPI\_STATUS\_SIZE,*), IERROR}
\mpifbind{MPI\_IPROBE(SOURCE, TAG, COMM, FLAG, STATUS, IERROR)\fargs LOGICAL  FLAG \\ INTEGER  SOURCE, TAG, COMM, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_PROBE(SOURCE, TAG, COMM, STATUS, IERROR)\fargs INTEGER SOURCE, TAG, COMM, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_CANCEL(REQUEST, IERROR)\fargs INTEGER  REQUEST, IERROR}
\mpifbind{MPI\_TEST\_CANCELLED(STATUS, FLAG, IERROR)\fargs LOGICAL FLAG \\ INTEGER  STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_SEND\_INIT(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)\fargs <type>  BUF(*) \\ INTEGER  REQUEST, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_BSEND\_INIT(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)\fargs <type>  BUF(*) \\ INTEGER  REQUEST, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_SSEND\_INIT(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)\fargs <type>  BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_RSEND\_INIT(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)\fargs <type>  BUF(*) \\ INTEGER  COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_RECV\_INIT(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR)\fargs <type>  BUF(*) \\ INTEGER  COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR}
\mpifbind{MPI\_START(REQUEST, IERROR)\fargs INTEGER  REQUEST, IERROR}
\mpifbind{MPI\_STARTALL(COUNT, ARRAY\_OF\_REQUESTS, IERROR)\fargs INTEGER  COUNT, ARRAY\_OF\_REQUESTS(*), IERROR}
\mpifbind{MPI\_SENDRECV(SENDBUF, SENDCOUNT, SENDTYPE, DEST, SENDTAG, RECVBUF, RECVCOUNT, RECVTYPE, SOURCE, RECVTAG, COMM, STATUS, IERROR)\fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER  SENDCOUNT, SENDTYPE, DEST, SENDTAG, RECVCOUNT, RECVTYPE, SOURCE, RECVTAG, COMM, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_SENDRECV\_REPLACE(BUF, COUNT, DATATYPE, DEST, SENDTAG, SOURCE, RECVTAG, COMM, STATUS, IERROR)\fargs <type> BUF(*) \\ INTEGER COUNT, DATATYPE, DEST, SENDTAG, SOURCE, RECVTAG, COMM, STATUS(MPI\_STATUS\_SIZE), IERROR}
\mpifbind{MPI\_TYPE\_CONTIGUOUS(COUNT, OLDTYPE, NEWTYPE, IERROR)\fargs INTEGER  COUNT, OLDTYPE, NEWTYPE, IERROR}
\mpifbind{MPI\_TYPE\_VECTOR(COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR)\fargs INTEGER  COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR}
\mpifbind{MPI\_TYPE\_HVECTOR(COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR)\fargs INTEGER  COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR}
\mpifbind{MPI\_TYPE\_INDEXED(COUNT, ARRAY\_OF\_BLOCKLENGTHS, ARRAY\_OF\_DISPLACEMENTS, OLDTYPE, NEWTYPE, IERROR)\fargs INTEGER COUNT, ARRAY\_OF\_BLOCKLENGTHS(*), ARRAY\_OF\_DISPLACEMENTS(*), OLDTYPE, NEWTYPE, IERROR}
\mpifbind{MPI\_TYPE\_HINDEXED(COUNT, ARRAY\_OF\_BLOCKLENGTHS, ARRAY\_OF\_DISPLACEMENTS, OLDTYPE, NEWTYPE, IERROR)\fargs INTEGER COUNT, ARRAY\_OF\_BLOCKLENGTHS(*), ARRAY\_OF\_DISPLACEMENTS(*), OLDTYPE, NEWTYPE, IERROR}
\mpifbind{MPI\_TYPE\_STRUCT(COUNT, ARRAY\_OF\_BLOCKLENGTHS, ARRAY\_OF\_DISPLACEMENTS, ARRAY\_OF\_TYPES, NEWTYPE, IERROR)\fargs INTEGER  COUNT, ARRAY\_OF\_BLOCKLENGTHS(*), ARRAY\_OF\_DISPLACEMENTS(*), ARRAY\_OF\_TYPES(*), NEWTYPE, IERROR}
\mpifbind{MPI\_ADDRESS(LOCATION, ADDRESS, IERROR)\fargs <type> LOCATION(*) \\ INTEGER  ADDRESS, IERROR}
\mpifbind{MPI\_TYPE\_EXTENT(DATATYPE, EXTENT, IERROR)\fargs INTEGER DATATYPE, EXTENT, IERROR}
\mpifbind{MPI\_TYPE\_SIZE(DATATYPE, SIZE, IERROR)\fargs INTEGER DATATYPE, SIZE, IERROR}
\mpifbind{MPI\_TYPE\_LB( DATATYPE, DISPLACEMENT, IERROR)\fargs INTEGER DATATYPE, DISPLACEMENT, IERROR}
\mpifbind{MPI\_TYPE\_UB( DATATYPE, DISPLACEMENT, IERROR)\fargs INTEGER DATATYPE, DISPLACEMENT, IERROR}
\mpifbind{MPI\_TYPE\_COMMIT(DATATYPE, IERROR)\fargs INTEGER  DATATYPE, IERROR}
\mpifbind{MPI\_TYPE\_FREE(DATATYPE, IERROR)\fargs INTEGER  DATATYPE, IERROR}
\mpifbind{MPI\_GET\_ELEMENTS(STATUS, DATATYPE, COUNT, IERROR)\fargs INTEGER  STATUS(MPI\_STATUS\_SIZE), DATATYPE, COUNT, IERROR}
\mpifbind{MPI\_PACK(INBUF, INCOUNT, DATATYPE, OUTBUF, OUTSIZE, POSITION, COMM, IERROR)\fargs <type> INBUF(*), OUTBUF(*)\\ INTEGER INCOUNT, DATATYPE, OUTSIZE, POSITION,  COMM, IERROR}
\mpifbind{MPI\_UNPACK(INBUF, INSIZE, POSITION, OUTBUF, OUTCOUNT, DATATYPE, COMM, IERROR)\fargs  <type> INBUF(*), OUTBUF(*) \\ INTEGER INSIZE, POSITION, OUTCOUNT, DATATYPE, COMM, IERROR}
\mpifbind{MPI\_PACK\_SIZE(INCOUNT, DATATYPE, COMM, SIZE, IERROR)\fargs INTEGER INCOUNT, DATATYPE, COMM, SIZE, IERROR}


\section{Fortran Bindings for Collective Communication}

\mpifbind{MPI\_BARRIER(COMM, IERROR) \fargs INTEGER COMM, IERROR}
\mpifbind{ MPI\_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) \fargs <type>  BUFFER(*) \\ INTEGER COUNT, DATATYPE, ROOT, COMM, IERROR}
\mpifbind{MPI\_GATHER(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR}
\mpifbind{MPI\_GATHERV(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE, ROOT, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER SENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*), RECVTYPE, ROOT, COMM, IERROR}
\mpifbind{MPI\_SCATTER(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR}
\mpifbind{MPI\_SCATTERV(SENDBUF, SENDCOUNTS, DISPLS, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER SENDCOUNTS(*), DISPLS(*), SENDTYPE, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR}
\mpifbind{MPI\_ALLGATHER(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR}
\mpifbind{MPI\_ALLGATHERV(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER SENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*), RECVTYPE, COMM, IERROR}
\mpifbind{MPI\_ALLTOALL(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR}
\mpifbind{MPI\_ALLTOALLV(SENDBUF, SENDCOUNTS, SDISPLS, SENDTYPE, RECVBUF, RECVCOUNTS, RDISPLS, RECVTYPE, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER SENDCOUNTS(*), SDISPLS(*), SENDTYPE, RECVCOUNTS(*), RDISPLS(*), RECVTYPE, COMM, IERROR}
\mpifbind{MPI\_REDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, ROOT, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER COUNT, DATATYPE, OP, ROOT, COMM, IERROR}
\mpifbind{MPI\_OP\_CREATE( FUNCTION, COMMUTE, OP, IERROR) \fargs EXTERNAL FUNCTION \\ LOGICAL COMMUTE \\ INTEGER OP, IERROR}
\mpifbind{MPI\_OP\_FREE( OP, IERROR) \fargs INTEGER OP, IERROR}
\mpifbind{MPI\_ALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER COUNT, DATATYPE, OP, COMM, IERROR}
\mpifbind{MPI\_REDUCE\_SCATTER(SENDBUF, RECVBUF, RECVCOUNTS, DATATYPE, OP, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER RECVCOUNTS(*), DATATYPE, OP, COMM, IERROR}
\mpifbind{MPI\_SCAN(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, IERROR) \fargs <type> SENDBUF(*), RECVBUF(*) \\ INTEGER COUNT, DATATYPE, OP, COMM, IERROR}

\section{Fortran Bindings for Groups, Contexts, etc.}

\mpifbind{MPI\_GROUP\_SIZE(GROUP, SIZE, IERROR)\fargs INTEGER GROUP, SIZE, IERROR}
\mpifbind{MPI\_GROUP\_RANK(GROUP, RANK, IERROR)\fargs INTEGER GROUP, RANK, IERROR}
\mpifbind{MPI\_GROUP\_TRANSLATE\_RANKS(GROUP1, N, RANKS1, GROUP2, RANKS2, IERROR)\fargs INTEGER GROUP1, N, RANKS1(*), GROUP2, RANKS2(*), IERROR}
\mpifbind{MPI\_GROUP\_COMPARE(GROUP1, GROUP2, RESULT, IERROR)\fargs INTEGER GROUP1, GROUP2, RESULT, IERROR}
\mpifbind{MPI\_COMM\_GROUP(COMM, GROUP, IERROR)\fargs INTEGER COMM, GROUP, IERROR}
\mpifbind{MPI\_GROUP\_UNION(GROUP1, GROUP2, NEWGROUP, IERROR)\fargs INTEGER GROUP1, GROUP2, NEWGROUP, IERROR}
\mpifbind{MPI\_GROUP\_INTERSECTION(GROUP1, GROUP2, NEWGROUP, IERROR)\fargs INTEGER GROUP1, GROUP2, NEWGROUP, IERROR}
\mpifbind{MPI\_GROUP\_DIFFERENCE(GROUP1, GROUP2, NEWGROUP, IERROR)\fargs INTEGER GROUP1, GROUP2, NEWGROUP, IERROR}
\mpifbind{MPI\_GROUP\_INCL(GROUP, N, RANKS, NEWGROUP, IERROR)\fargs INTEGER GROUP, N, RANKS(*), NEWGROUP, IERROR}
\mpifbind{MPI\_GROUP\_EXCL(GROUP, N, RANKS, NEWGROUP, IERROR)\fargs INTEGER GROUP, N, RANKS(*), NEWGROUP, IERROR}
\mpifbind{MPI\_GROUP\_RANGE\_INCL(GROUP, N, RANGES, NEWGROUP, IERROR)\fargs INTEGER GROUP, N, RANGES(3,*), NEWGROUP, IERROR}
\mpifbind{MPI\_GROUP\_RANGE\_EXCL(GROUP, N, RANGES, NEWGROUP, IERROR)\fargs INTEGER GROUP, N, RANGES(3,*), NEWGROUP, IERROR}
\mpifbind{MPI\_GROUP\_FREE(GROUP, IERROR)\fargs INTEGER GROUP, IERROR}
\mpifbind{MPI\_COMM\_SIZE(COMM, SIZE, IERROR)\fargs INTEGER COMM, SIZE, IERROR}
\mpifbind{MPI\_COMM\_RANK(COMM, RANK, IERROR)\fargs INTEGER COMM, RANK, IERROR}
\mpifbind{MPI\_COMM\_COMPARE(COMM1, COMM2, RESULT, IERROR)\fargs INTEGER COMM1, COMM2, RESULT, IERROR}
\mpifbind{MPI\_COMM\_DUP(COMM, NEWCOMM, IERROR)\fargs INTEGER COMM, NEWCOMM, IERROR}
\mpifbind{MPI\_COMM\_CREATE(COMM, GROUP, NEWCOMM, IERROR)\fargs INTEGER COMM, GROUP, NEWCOMM, IERROR}
\mpifbind{MPI\_COMM\_SPLIT(COMM, COLOR, KEY, NEWCOMM, IERROR)\fargs INTEGER COMM, COLOR, KEY, NEWCOMM, IERROR}
\mpifbind{MPI\_COMM\_FREE(COMM, IERROR)\fargs INTEGER COMM, IERROR}
\mpifbind{MPI\_COMM\_TEST\_INTER(COMM, FLAG, IERROR)\fargs INTEGER COMM, IERROR\\ LOGICAL FLAG}
\mpifbind{MPI\_COMM\_REMOTE\_SIZE(COMM, SIZE, IERROR)\fargs INTEGER COMM, SIZE, IERROR}
\mpifbind{MPI\_COMM\_REMOTE\_GROUP(COMM, GROUP, IERROR)\fargs INTEGER COMM, GROUP, IERROR}
\mpifbind{MPI\_INTERCOMM\_CREATE(LOCAL\_COMM, LOCAL\_LEADER, PEER\_COMM, REMOTE\_LEADER, TAG, NEWINTERCOMM, IERROR)\fargs INTEGER LOCAL\_COMM, LOCAL\_LEADER, PEER\_COMM, REMOTE\_LEADER, TAG, NEWINTERCOMM, IERROR}
\mpifbind{MPI\_INTERCOMM\_MERGE(INTERCOMM, HIGH, INTRACOMM, IERROR)\fargs INTEGER INTERCOMM, INTRACOMM, IERROR \\ LOGICAL HIGH}
\mpifbind{MPI\_KEYVAL\_CREATE(COPY\_FN, DELETE\_FN, KEYVAL, EXTRA\_STATE, IERROR)\fargs EXTERNAL COPY\_FN, DELETE\_FN \\ INTEGER KEYVAL, EXTRA\_STATE, IERROR}
\mpifbind{MPI\_KEYVAL\_FREE(KEYVAL, IERROR)\fargs INTEGER KEYVAL, IERROR}
\mpifbind{MPI\_ATTR\_PUT(COMM, KEYVAL, ATTRIBUTE\_VAL, IERROR)\fargs INTEGER COMM, KEYVAL, ATTRIBUTE\_VAL, IERROR}
\mpifbind{MPI\_ATTR\_GET(COMM, KEYVAL, ATTRIBUTE\_VAL, FLAG, IERROR)\fargs INTEGER COMM, KEYVAL, ATTRIBUTE\_VAL, IERROR \\ LOGICAL FLAG}
\mpifbind{MPI\_ATTR\_DELETE(COMM, KEYVAL, IERROR)\fargs INTEGER COMM, KEYVAL, IERROR}


\section{Fortran Bindings for Process Topologies}

\mpifbind{MPI\_CART\_CREATE(COMM\_OLD, NDIMS, DIMS, PERIODS, REORDER, COMM\_CART, IERROR)\fargs INTEGER COMM\_OLD, NDIMS, DIMS(*), COMM\_CART, IERROR \\ LOGICAL PERIODS(*), REORDER}
\mpifbind{MPI\_DIMS\_CREATE(NNODES, NDIMS, DIMS, IERROR)\fargs INTEGER NNODES, NDIMS, DIMS(*), IERROR}
\mpifbind{MPI\_GRAPH\_CREATE(COMM\_OLD, NNODES, INDEX, EDGES, REORDER, COMM\_GRAPH, IERROR)\fargs INTEGER COMM\_OLD, NNODES, INDEX(*), EDGES(*), COMM\_GRAPH, IERROR \\ LOGICAL REORDER}
\mpifbind{MPI\_TOPO\_TEST(COMM, STATUS, IERROR)\fargs INTEGER COMM, STATUS, IERROR}
\mpifbind{MPI\_GRAPHDIMS\_GET(COMM, NNODES, NEDGES, IERROR)\fargs INTEGER COMM, NNODES, NEDGES, IERROR}
\mpifbind{MPI\_GRAPH\_GET(COMM, MAXINDEX, MAXEDGES, INDEX, EDGES, IERROR)\fargs INTEGER COMM, MAXINDEX, MAXEDGES, INDEX(*), EDGES(*), IERROR}
\mpifbind{MPI\_CARTDIM\_GET(COMM, NDIMS, IERROR)\fargs INTEGER COMM, NDIMS, IERROR}
\mpifbind{MPI\_CART\_GET(COMM, MAXDIMS, DIMS, PERIODS, COORDS, IERROR)\fargs INTEGER COMM, MAXDIMS, DIMS(*), COORDS(*), IERROR \\ LOGICAL PERIODS(*)}
\mpifbind{MPI\_CART\_RANK(COMM, COORDS, RANK, IERROR)\fargs INTEGER COMM, COORDS(*), RANK, IERROR}
\mpifbind{MPI\_CART\_COORDS(COMM, RANK, MAXDIMS, COORDS, IERROR)\fargs INTEGER COMM, RANK, MAXDIMS, COORDS(*), IERROR}
\mpifbind{MPI\_GRAPH\_NEIGHBORS\_COUNT(COMM, RANK, NNEIGHBORS, IERROR)\fargs INTEGER COMM, RANK, NNEIGHBORS, IERROR}
\mpifbind{MPI\_GRAPH\_NEIGHBORS(COMM, RANK, MAXNEIGHBORS, NEIGHBORS, IERROR)\fargs INTEGER COMM, RANK, MAXNEIGHBORS, NEIGHBORS(*), IERROR}
\mpifbind{MPI\_CART\_SHIFT(COMM, DIRECTION, DISP, RANK\_SOURCE, RANK\_DEST, IERROR)\fargs INTEGER COMM, DIRECTION, DISP, RANK\_SOURCE, RANK\_DEST, IERROR}
\mpifbind{MPI\_CART\_SUB(COMM, REMAIN\_DIMS, NEWCOMM, IERROR)\fargs INTEGER COMM, NEWCOMM, IERROR \\ LOGICAL REMAIN\_DIMS(*)}
\mpifbind{MPI\_CART\_MAP(COMM, NDIMS, DIMS, PERIODS, NEWRANK, IERROR)\fargs INTEGER COMM, NDIMS, DIMS(*), NEWRANK, IERROR \\ LOGICAL PERIODS(*)}
\mpifbind{MPI\_GRAPH\_MAP(COMM, NNODES, INDEX, EDGES, NEWRANK, IERROR)\fargs INTEGER COMM, NNODES, INDEX(*), EDGES(*), NEWRANK, IERROR}


\section{Fortran Bindings for Environmental Inquiry}

\mpifbind{MPI\_GET\_PROCESSOR\_NAME(NAME, RESULTLEN, IERROR)\fargs CHARACTER*(*) NAME\\INTEGER RESULTLEN, IERROR}
\mpifbind{MPI\_ERRHANDLER\_CREATE(FUNCTION, HANDLER, IERROR)\fargs EXTERNAL FUNCTION \\ INTEGER ERRHANDLER, IERROR}
\mpifbind{MPI\_ERRHANDLER\_SET(COMM, ERRHANDLER, IERROR)\fargs INTEGER COMM, ERRHANDLER, IERROR}
\mpifbind{MPI\_ERRHANDLER\_GET(COMM, ERRHANDLER, IERROR)\fargs INTEGER COMM, ERRHANDLER, IERROR}
\mpifbind{MPI\_ERRHANDLER\_FREE(ERRHANDLER, IERROR)\fargs INTEGER ERRHANDLER, IERROR}
\mpifbind{MPI\_ERROR\_STRING(ERRORCODE, STRING, RESULTLEN, IERROR)\fargs INTEGER ERRORCODE, RESULTLEN, IERROR \\ CHARACTER*(*) STRING}
\mpifbind{MPI\_ERROR\_CLASS(ERRORCODE, ERRORCLASS, IERROR)\fargs INTEGER ERRORCODE, ERRORCLASS, IERROR}
\mpifbind{DOUBLE PRECISION MPI\_WTIME()}
\mpifbind{DOUBLE PRECISION MPI\_WTICK()}
\mpifbind{MPI\_INIT(IERROR)\fargs INTEGER IERROR}
\mpifbind{MPI\_FINALIZE(IERROR)\fargs INTEGER IERROR}
\mpifbind{MPI\_INITIALIZED(FLAG, IERROR)\fargs LOGICAL FLAG \\ INTEGER IERROR}
\mpifbind{MPI\_ABORT(COMM, ERRORCODE, IERROR)\fargs INTEGER COMM, ERRORCODE, IERROR}


\section{Fortran Bindings for Profiling}

\mpifbind{MPI\_PCONTROL(level)\fargs INTEGER LEVEL, \ldots}



.
