D R A F T

Document for a Standard Message-Passing Interface

Message Passing Interface Forum

May 30, 1995

This work was supported in part by ARPA and NSF under grant ASC-9310330, the

National Science Foundation Science and Technology Center Cooperative Agreement No. CCR-8809615, and by the Commission of the European Community

through Esprit project P6643.

This is the result of a LaTeX run of a draft of a single chapter of the MPIF Final Report document.

Chapter 1

Language Binding

1.1 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.

1.2 Defined Constants for C and Fortran

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

/* 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) */

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

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) */

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

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

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

/* 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)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

typedef void MPI_Handler_function(MPI_Comm *, int *, ...);
typedef void MPI_User_function( void *invec, void *inoutvec, int *len,
                      MPI_Datatype *datatype);

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

The user-function argument to MPI OP CREATE should be declared like this:

FUNCTION USER_FUNCTION( INVEC(*), INOUTVEC(*), LEN, TYPE)
<type> INVEC(LEN), INOUTVEC(LEN)
 INTEGER LEN, TYPE

The copy-function argument to MPI KEYVAL CREATE should be declared like this:

 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

The delete-function argument to MPI KEYVAL CREATE should be declared like this:

PROCEDURE DELETE_FUNCTION(COMM, KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, IERR)
 INTEGER COMM, KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, IERR

1.3 C bindings for Point-to-Point Communication

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

int MPI Send(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm)
int MPI Recv(void* buf, int count, MPI Datatype datatype, int source,
             int tag, MPI Comm comm, MPI Status *status)
int MPI Get count(MPI Status *status, MPI Datatype datatype, int *count)
int MPI Bsend(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm)
int MPI Ssend(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm)
int MPI Rsend(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm)
int MPI Buffer attach( void* buffer, int size)
int MPI Buffer detach( void* buffer, int* size)
int MPI Isend(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm, MPI Request *request)
int MPI Ibsend(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm, MPI Request *request)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

int MPI Issend(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm, MPI Request *request)
int MPI Irsend(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm, MPI Request *request)
int MPI Irecv(void* buf, int count, MPI Datatype datatype, int source,
             int tag, MPI Comm comm, MPI Request *request)
int MPI Wait(MPI Request *request, MPI Status *status)
int MPI Test(MPI Request *request, int *flag, MPI Status *status)
int MPI Request free(MPI Request *request)
int MPI Waitany(int count, MPI Request *array of requests, int *index,
             MPI Status *status)
int MPI Testany(int count, MPI Request *array of requests, int *index,
             int *flag, MPI Status *status)
int MPI Waitall(int count, MPI Request *array of requests,
             MPI Status *array of statuses)
int MPI Testall(int count, MPI Request *array of requests, int *flag,
             MPI Status *array of statuses)
int MPI Waitsome(int incount, MPI Request *array of requests, int *outcount,
             int *array of indices, MPI Status *array of statuses)
int MPI Testsome(int incount, MPI Request *array of requests, int *outcount,
             int *array of indices, MPI Status *array of statuses)
int MPI Iprobe(int source, int tag, MPI Comm comm, int *flag,
             MPI Status *status)
int MPI Probe(int source, int tag, MPI Comm comm, MPI Status *status)
int MPI Cancel(MPI Request *request)
int MPI Test cancelled(MPI Status *status, int *flag)
int MPI Send init(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm, MPI Request *request)
int MPI Bsend init(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm, MPI Request *request)
int MPI Ssend init(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm, MPI Request *request)
int MPI Rsend init(void* buf, int count, MPI Datatype datatype, int dest,
             int tag, MPI Comm comm, MPI Request *request)
int MPI Recv init(void* buf, int count, MPI Datatype datatype, int source,
             int tag, MPI Comm comm, MPI Request *request)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

int MPI Start(MPI Request *request)
int MPI Startall(int count, MPI Request *array of requests)
int 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)
int MPI Sendrecv replace(void* buf, int count, MPI Datatype datatype,
             int dest, int sendtag, int source, int recvtag, MPI Comm comm,
             MPI Status *status)
int MPI Type contiguous(int count, MPI Datatype oldtype,
             MPI Datatype *newtype)
int MPI Type vector(int count, int blocklength, int stride,
             MPI Datatype oldtype, MPI Datatype *newtype)
int MPI Type hvector(int count, int blocklength, MPI Aint stride,
             MPI Datatype oldtype, MPI Datatype *newtype)
int MPI Type indexed(int count, int *array of blocklengths,
             int *array of displacements, MPI Datatype oldtype,
             MPI Datatype *newtype)
int MPI Type hindexed(int count, int *array of blocklengths,
             MPI Aint *array of displacements, MPI Datatype oldtype,
             MPI Datatype *newtype)
int MPI Type struct(int count, int *array of blocklengths,
             MPI Aint *array of displacements, MPI Datatype *array of types,
             MPI Datatype *newtype)
int MPI Address(void* location, MPI Aint *address)
int MPI Type extent(MPI Datatype datatype, MPI Aint *extent)
int MPI Type size(MPI Datatype datatype, int *size)
int MPI Type lb(MPI Datatype datatype, MPI Aint* displacement)
int MPI Type ub(MPI Datatype datatype, MPI Aint* displacement)
int MPI Type commit(MPI Datatype *datatype)
int MPI Type free(MPI Datatype *datatype)
int MPI Get elements(MPI Status *status, MPI Datatype datatype, int *count)

⊤

int MPI Pack(void* inbuf, int incount, MPI Datatype datatype, void *outbuf,
             int outsize, int *position, MPI Comm comm)

⊥

int MPI Unpack(void* inbuf, int insize, int *position, void *outbuf,
             int outcount, MPI Datatype datatype, MPI Comm comm)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

int MPI Pack size(int incount, MPI Datatype datatype, MPI Comm comm,
int *size)

1.4 C Bindings for Collective Communication

int MPI Barrier(MPI Comm comm )
int MPI Bcast(void* buffer, int count, MPI Datatype datatype, int root,
MPI Comm comm )
int MPI Gather(void* sendbuf, int sendcount, MPI Datatype sendtype,
void* recvbuf, int recvcount, MPI Datatype recvtype, int root,
MPI Comm comm)
int MPI Gatherv(void* sendbuf, int sendcount, MPI Datatype sendtype,
void* recvbuf, int *recvcounts, int *displs,
MPI Datatype recvtype, int root, MPI Comm comm)
int MPI Scatter(void* sendbuf, int sendcount, MPI Datatype sendtype,
void* recvbuf, int recvcount, MPI Datatype recvtype, int root,
MPI Comm comm)
int MPI Scatterv(void* sendbuf, int *sendcounts, int *displs,
MPI Datatype sendtype, void* recvbuf, int recvcount,
MPI Datatype recvtype, int root, MPI Comm comm)
int MPI Allgather(void* sendbuf, int sendcount, MPI Datatype sendtype,
void* recvbuf, int recvcount, MPI Datatype recvtype,
MPI Comm comm)
int MPI Allgatherv(void* sendbuf, int sendcount, MPI Datatype sendtype,
void* recvbuf, int *recvcounts, int *displs,
MPI Datatype recvtype, MPI Comm comm)
int MPI Alltoall(void* sendbuf, int sendcount, MPI Datatype sendtype,
void* recvbuf, int recvcount, MPI Datatype recvtype,
MPI Comm comm)
int MPI Alltoallv(void* sendbuf, int *sendcounts, int *sdispls,
MPI Datatype sendtype, void* recvbuf, int *recvcounts,
int *rdispls, MPI Datatype recvtype, MPI Comm comm)
int MPI Reduce(void* sendbuf, void* recvbuf, int count,
MPI Datatype datatype, MPI Op op, int root, MPI Comm comm)
int MPI Op create(MPI User function *function, int commute, MPI Op *op)
int MPI Op free( MPI Op *op)
int MPI Allreduce(void* sendbuf, void* recvbuf, int count,
MPI Datatype datatype, MPI Op op, MPI Comm comm)
int MPI Reduce scatter(void* sendbuf, void* recvbuf, int *recvcounts,

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

             MPI Datatype datatype, MPI Op op, MPI Comm comm)
int MPI Scan(void* sendbuf, void* recvbuf, int count,
             MPI Datatype datatype, MPI Op op, MPI Comm comm )

1.5 C Bindings for Groups, Contexts, and Communicators

int MPI Group size(MPI Group group, int *size)
int MPI Group rank(MPI Group group, int *rank)
int MPI Group translate ranks (MPI Group group1, int n, int *ranks1,
             MPI Group group2, int *ranks2)
int MPI Group compare(MPI Group group1,MPI Group group2, int *result)
int MPI Comm group(MPI Comm comm, MPI Group *group)
int MPI Group union(MPI Group group1, MPI Group group2, MPI Group *newgroup)
int MPI Group intersection(MPI Group group1, MPI Group group2,
             MPI Group *newgroup)
int MPI Group difference(MPI Group group1, MPI Group group2,
             MPI Group *newgroup)
int MPI Group incl(MPI Group group, int n, int *ranks, MPI Group *newgroup)
int MPI Group excl(MPI Group group, int n, int *ranks, MPI Group *newgroup)
int MPI Group range incl(MPI Group group, int n, int ranges[][3],
             MPI Group *newgroup)
int MPI Group range excl(MPI Group group, int n, int ranges[][3],
             MPI Group *newgroup)
int MPI Group free(MPI Group *group)
int MPI Comm size(MPI Comm comm, int *size)
int MPI Comm rank(MPI Comm comm, int *rank)
int MPI Comm compare(MPI Comm comm1,MPI Comm comm2, int *result)
int MPI Comm dup(MPI Comm comm, MPI Comm *newcomm)
int MPI Comm create(MPI Comm comm, MPI Group group, MPI Comm *newcomm)
int MPI Comm split(MPI Comm comm, int color, int key, MPI Comm *newcomm)
int MPI Comm free(MPI Comm *comm)
int MPI Comm test inter(MPI Comm comm, int *flag)
int MPI Comm remote size(MPI Comm comm, int *size)
int MPI Comm remote group(MPI Comm comm, MPI Group *group)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

int MPI Intercomm create(MPI Comm local comm, int local leader,
             MPI Comm peer comm, int remote leader, int tag,
             MPI Comm *newintercomm)
int MPI Intercomm merge(MPI Comm intercomm, int high,
             MPI Comm *newintracomm)
int MPI Keyval create(MPI Copy function *copy fn, MPI Delete function
             *delete fn, int *keyval, void* extra state)
int MPI Keyval free(int *keyval)
int MPI Attr put(MPI Comm comm, int keyval, void* attribute val)
int MPI Attr get(MPI Comm comm, int keyval, void* attribute val, int *flag)
int MPI Attr delete(MPI Comm comm, int keyval)

1.6 C Bindings for Process Topologies

int MPI Cart create(MPI Comm comm old, int ndims, int *dims, int *periods,
             int reorder, MPI Comm *comm cart)
int MPI Dims create(int nnodes, int ndims, int *dims)
int MPI Graph create(MPI Comm comm old, int nnodes, int *index, int *edges,
             int reorder, MPI Comm *comm graph)
int MPI Topo test(MPI Comm comm, int *status)
int MPI Graphdims get(MPI Comm comm, int *nnodes, int *nedges)
int MPI Graph get(MPI Comm comm, int maxindex, int maxedges, int *index,
             int *edges)
int MPI Cartdim get(MPI Comm comm, int *ndims)
int MPI Cart get(MPI Comm comm, int maxdims, int *dims, int *periods,
             int *coords)
int MPI Cart rank(MPI Comm comm, int *coords, int *rank)
int MPI Cart coords(MPI Comm comm, int rank, int maxdims, int *coords)
int MPI Graph neighbors count(MPI Comm comm, int rank, int *nneighbors)
int MPI Graph neighbors(MPI Comm comm, int rank, int maxneighbors,
             int *neighbors)
int MPI Cart shift(MPI Comm comm, int direction, int disp, int *rank source,
             int *rank dest)
int MPI Cart sub(MPI Comm comm, int *remain dims, MPI Comm *newcomm)
int MPI Cart map(MPI Comm comm, int ndims, int *dims, int *periods,
             int *newrank)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

int MPI Graph map(MPI Comm comm, int nnodes, int *index, int *edges,
             int *newrank)

1.7 C bindings for Environmental Inquiry

int MPI Get processor name(char *name, int *resultlen)
int MPI Errhandler create(MPI Handler function *function,
             MPI Errhandler *errhandler)
int MPI Errhandler set(MPI Comm comm, MPI Errhandler errhandler)
int MPI Errhandler get(MPI Comm comm, MPI Errhandler *errhandler)
int MPI Errhandler free(MPI Errhandler *errhandler)
int MPI Error string(int errorcode, char *string, int *resultlen)
int MPI Error class(int errorcode, int *errorclass)
int double MPI Wtime(void)
int double MPI Wtick(void)
int MPI Init(int *argc, char ***argv)
int MPI Finalize(void)
int MPI Initialized(int *flag)
int MPI Abort(MPI Comm comm, int errorcode)

1.8 C Bindings for Profiling

int MPI Pcontrol(const int level, . . .)

1.9 Fortran Bindings for Point-to-Point Communication

MPI SEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)
    <type> BUF(*)
    INTEGER COUNT, DATATYPE, DEST, TAG, COMM, IERROR
MPI RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, IERROR)
    <type> BUF(*)
    INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS(MPI STATUS SIZE),
    IERROR
MPI GET COUNT(STATUS, DATATYPE, COUNT, IERROR)
    INTEGER STATUS(MPI STATUS SIZE), DATATYPE, COUNT, IERROR
MPI BSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)
    <type> BUF(*)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

INTEGER COUNT, DATATYPE, DEST, TAG, COMM, IERROR
MPI SSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, TAG, COMM, IERROR
MPI RSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, TAG, COMM, IERROR
MPI BUFFER ATTACH( BUFFER, SIZE, IERROR)
<type> BUFFER(*)
INTEGER SIZE, IERROR
MPI BUFFER DETACH( BUFFER, SIZE, IERROR)
<type> BUFFER(*)
INTEGER SIZE, IERROR
MPI ISEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR
MPI IBSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR
MPI ISSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR
MPI IRSEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR
MPI IRECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR
MPI WAIT(REQUEST, STATUS, IERROR)
INTEGER REQUEST, STATUS(MPI STATUS SIZE), IERROR
MPI TEST(REQUEST, FLAG, STATUS, IERROR)
LOGICAL FLAG
INTEGER REQUEST, STATUS(MPI STATUS SIZE), IERROR
MPI REQUEST FREE(REQUEST, IERROR)
INTEGER REQUEST, IERROR
MPI WAITANY(COUNT, ARRAY OF REQUESTS, INDEX, STATUS, IERROR)
INTEGER COUNT, ARRAY OF REQUESTS(*), INDEX, STATUS(MPI STATUS SIZE),
IERROR
MPI TESTANY(COUNT, ARRAY OF REQUESTS, INDEX, FLAG, STATUS, IERROR)
LOGICAL FLAG

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

INTEGER COUNT, ARRAY OF REQUESTS(*), INDEX, STATUS(MPI STATUS SIZE),
IERROR
MPI WAITALL(COUNT, ARRAY OF REQUESTS, ARRAY OF STATUSES, IERROR)
INTEGER COUNT, ARRAY OF REQUESTS(*),
ARRAY OF STATUSES(MPI STATUS SIZE,*), IERROR
MPI TESTALL(COUNT, ARRAY OF REQUESTS, FLAG, ARRAY OF STATUSES, IERROR)
LOGICAL FLAG
INTEGER COUNT, ARRAY OF REQUESTS(*),
ARRAY OF STATUSES(MPI STATUS SIZE,*), IERROR
MPI WAITSOME(INCOUNT, ARRAY OF REQUESTS, OUTCOUNT, ARRAY OF INDICES,
         ARRAY OF STATUSES, IERROR)
INTEGER INCOUNT, ARRAY OF REQUESTS(*), OUTCOUNT, ARRAY OF INDICES(*),
ARRAY OF STATUSES(MPI STATUS SIZE,*), IERROR
MPI TESTSOME(INCOUNT, ARRAY OF REQUESTS, OUTCOUNT, ARRAY OF INDICES,
         ARRAY OF STATUSES, IERROR)
INTEGER INCOUNT, ARRAY OF REQUESTS(*), OUTCOUNT, ARRAY OF INDICES(*),
ARRAY OF STATUSES(MPI STATUS SIZE,*), IERROR
MPI IPROBE(SOURCE, TAG, COMM, FLAG, STATUS, IERROR)
LOGICAL FLAG
INTEGER SOURCE, TAG, COMM, STATUS(MPI STATUS SIZE), IERROR
MPI PROBE(SOURCE, TAG, COMM, STATUS, IERROR)
INTEGER SOURCE, TAG, COMM, STATUS(MPI STATUS SIZE), IERROR
MPI CANCEL(REQUEST, IERROR)
INTEGER REQUEST, IERROR
MPI TEST CANCELLED(STATUS, FLAG, IERROR)
LOGICAL FLAG
INTEGER STATUS(MPI STATUS SIZE), IERROR
MPI SEND INIT(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER REQUEST, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR
MPI BSEND INIT(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER REQUEST, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR
MPI SSEND INIT(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR
MPI RSEND INIT(BUF, COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, TAG, COMM, REQUEST, IERROR
MPI RECV INIT(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR)
<type> BUF(*)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, REQUEST, IERROR
MPI START(REQUEST, IERROR)
INTEGER REQUEST, IERROR
MPI STARTALL(COUNT, ARRAY OF REQUESTS, IERROR)
INTEGER COUNT, ARRAY OF REQUESTS(*), IERROR
MPI SENDRECV(SENDBUF, SENDCOUNT, SENDTYPE, DEST, SENDTAG, RECVBUF,
         RECVCOUNT, RECVTYPE, SOURCE, RECVTAG, COMM, STATUS, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNT, SENDTYPE, DEST, SENDTAG, RECVCOUNT, RECVTYPE,
SOURCE, RECVTAG, COMM, STATUS(MPI STATUS SIZE), IERROR
MPI SENDRECV REPLACE(BUF, COUNT, DATATYPE, DEST, SENDTAG, SOURCE, RECVTAG,
         COMM, STATUS, IERROR)
<type> BUF(*)
INTEGER COUNT, DATATYPE, DEST, SENDTAG, SOURCE, RECVTAG, COMM,
STATUS(MPI STATUS SIZE), IERROR
MPI TYPE CONTIGUOUS(COUNT, OLDTYPE, NEWTYPE, IERROR)
INTEGER COUNT, OLDTYPE, NEWTYPE, IERROR
MPI TYPE VECTOR(COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR)
INTEGER COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR
MPI TYPE HVECTOR(COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR)
INTEGER COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR
MPI TYPE INDEXED(COUNT, ARRAY OF BLOCKLENGTHS, ARRAY OF DISPLACEMENTS,
         OLDTYPE, NEWTYPE, IERROR)
INTEGER COUNT, ARRAY OF BLOCKLENGTHS(*), ARRAY OF DISPLACEMENTS(*),
OLDTYPE, NEWTYPE, IERROR
MPI TYPE HINDEXED(COUNT, ARRAY OF BLOCKLENGTHS, ARRAY OF DISPLACEMENTS,
         OLDTYPE, NEWTYPE, IERROR)
INTEGER COUNT, ARRAY OF BLOCKLENGTHS(*), ARRAY OF DISPLACEMENTS(*),
OLDTYPE, NEWTYPE, IERROR
MPI TYPE STRUCT(COUNT, ARRAY OF BLOCKLENGTHS, ARRAY OF DISPLACEMENTS,
         ARRAY OF TYPES, NEWTYPE, IERROR)
INTEGER COUNT, ARRAY OF BLOCKLENGTHS(*), ARRAY OF DISPLACEMENTS(*),
ARRAY OF TYPES(*), NEWTYPE, IERROR
MPI ADDRESS(LOCATION, ADDRESS, IERROR)
<type> LOCATION(*)
INTEGER ADDRESS, IERROR
MPI TYPE EXTENT(DATATYPE, EXTENT, IERROR)
INTEGER DATATYPE, EXTENT, IERROR
MPI TYPE SIZE(DATATYPE, SIZE, IERROR)
INTEGER DATATYPE, SIZE, IERROR

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

MPI TYPE LB( DATATYPE, DISPLACEMENT, IERROR)
INTEGER DATATYPE, DISPLACEMENT, IERROR
MPI TYPE UB( DATATYPE, DISPLACEMENT, IERROR)
INTEGER DATATYPE, DISPLACEMENT, IERROR
MPI TYPE COMMIT(DATATYPE, IERROR)
INTEGER DATATYPE, IERROR
MPI TYPE FREE(DATATYPE, IERROR)
INTEGER DATATYPE, IERROR
MPI GET ELEMENTS(STATUS, DATATYPE, COUNT, IERROR)
INTEGER STATUS(MPI STATUS SIZE), DATATYPE, COUNT, IERROR
MPI PACK(INBUF, INCOUNT, DATATYPE, OUTBUF, OUTSIZE, POSITION, COMM, IERROR)
<type> INBUF(*), OUTBUF(*)
INTEGER INCOUNT, DATATYPE, OUTCOUNT, POSITION, COMM, IERROR
MPI UNPACK(INBUF, INSIZE, POSITION, OUTBUF, OUTSIZE, DATATYPE, COMM,
         IERROR)
<type> INBUF(*), OUTBUF(*)
INTEGER INSIZE, POSITION, OUTCOUNT, DATATYPE, COMM, IERROR
MPI PACK SIZE(INCOUNT, DATATYPE, COMM, SIZE, IERROR)
INTEGER INCOUNT, DATATYPE, COMM, SIZE, IERROR

1.10 Fortran Bindings for Collective Communication

MPI BARRIER(COMM, IERROR)
INTEGER COMM, IERROR
MPI BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR)
<type> BUFFER(*)
INTEGER COUNT, DATATYPE, ROOT, COMM, IERROR
MPI GATHER(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE,
         ROOT, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR
MPI GATHERV(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS,
         RECVTYPE, ROOT, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*), RECVTYPE, ROOT,
COMM, IERROR
MPI SCATTER(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE,
         ROOT, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

MPI SCATTERV(SENDBUF, SENDCOUNTS, DISPLS, SENDTYPE, RECVBUF, RECVCOUNT,
         RECVTYPE, ROOT, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNTS(*), DISPLS(*), SENDTYPE, RECVCOUNT, RECVTYPE, ROOT,
COMM, IERROR
MPI ALLGATHER(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE,
         COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR
MPI ALLGATHERV(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS, DISPLS,
         RECVTYPE, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*), RECVTYPE, COMM,
IERROR
MPI ALLTOALL(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE,
         COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR
MPI ALLTOALLV(SENDBUF, SENDCOUNTS, SDISPLS, SENDTYPE, RECVBUF, RECVCOUNTS,
         RDISPLS, RECVTYPE, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER SENDCOUNTS(*), SDISPLS(*), SENDTYPE, RECVCOUNTS(*), RDISPLS(*),
RECVTYPE, COMM, IERROR
MPI REDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, ROOT, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER COUNT, DATATYPE, OP, ROOT, COMM, IERROR
MPI OP CREATE( FUNCTION, COMMUTE, OP, IERROR)
EXTERNAL FUNCTION
LOGICAL COMMUTE
INTEGER OP, IERROR
MPI OP FREE( OP, IERROR)
INTEGER OP, IERROR
MPI ALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER COUNT, DATATYPE, OP, COMM, IERROR
MPI REDUCE SCATTER(SENDBUF, RECVBUF, RECVCOUNTS, DATATYPE, OP, COMM,
         IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER RECVCOUNTS(*), DATATYPE, OP, COMM, IERROR
MPI SCAN(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, IERROR)
<type> SENDBUF(*), RECVBUF(*)
INTEGER COUNT, DATATYPE, OP, COMM, IERROR

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

1.11 Fortran Bindings for Groups, Contexts, etc.

MPI GROUP SIZE(GROUP, SIZE, IERROR)
    INTEGER GROUP, SIZE, IERROR
MPI GROUP RANK(GROUP, RANK, IERROR)
    INTEGER GROUP, RANK, IERROR
MPI GROUP TRANSLATE RANKS(GROUP1, N, RANKS1, GROUP2, RANKS2, IERROR)
    INTEGER GROUP1, N, RANKS1(*), GROUP2, RANKS2(*), IERROR
MPI GROUP COMPARE(GROUP1, GROUP2, RESULT, IERROR)
    INTEGER GROUP1, GROUP2, RESULT, IERROR
MPI COMM GROUP(COMM, GROUP, IERROR)
    INTEGER COMM, GROUP, IERROR
MPI GROUP UNION(GROUP1, GROUP2, NEWGROUP, IERROR)
    INTEGER GROUP1, GROUP2, NEWGROUP, IERROR
MPI GROUP INTERSECTION(GROUP1, GROUP2, NEWGROUP, IERROR)
    INTEGER GROUP1, GROUP2, NEWGROUP, IERROR
MPI GROUP DIFFERENCE(GROUP1, GROUP2, NEWGROUP, IERROR)
    INTEGER GROUP1, GROUP2, NEWGROUP, IERROR
MPI GROUP INCL(GROUP, N, RANKS, NEWGROUP, IERROR)
    INTEGER GROUP, N, RANKS(*), NEWGROUP, IERROR
MPI GROUP EXCL(GROUP, N, RANKS, NEWGROUP, IERROR)
    INTEGER GROUP, N, RANKS(*), NEWGROUP, IERROR
MPI GROUP RANGE INCL(GROUP, N, RANGES, NEWGROUP, IERROR)
    INTEGER GROUP, N, RANGES(3,*), NEWGROUP, IERROR
MPI GROUP RANGE EXCL(GROUP, N, RANGES, NEWGROUP, IERROR)
    INTEGER GROUP, N, RANGES(3,*), NEWGROUP, IERROR
MPI GROUP FREE(GROUP, IERROR)
    INTEGER GROUP, IERROR
MPI COMM SIZE(COMM, SIZE, IERROR)
    INTEGER COMM, SIZE, IERROR
MPI COMM RANK(COMM, RANK, IERROR)
    INTEGER COMM, RANK, IERROR
MPI COMM COMPARE(COMM1, COMM2, RESULT, IERROR)
    INTEGER COMM1, COMM2, RESULT, IERROR
MPI COMM DUP(COMM, NEWCOMM, IERROR)
    INTEGER COMM, NEWCOMM, IERROR
MPI COMM CREATE(COMM, GROUP, NEWCOMM, IERROR)
    INTEGER COMM, GROUP, NEWCOMM, IERROR

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

MPI COMM SPLIT(COMM, COLOR, KEY, NEWCOMM, IERROR)
INTEGER COMM, COLOR, KEY, NEWCOMM, IERROR
MPI COMM FREE(COMM, IERROR)
INTEGER COMM, IERROR
MPI COMM TEST INTER(COMM, FLAG, IERROR)
INTEGER COMM, IERROR
LOGICAL FLAG
MPI COMM REMOTE SIZE(COMM, SIZE, IERROR)
INTEGER COMM, SIZE, IERROR
MPI COMM REMOTE GROUP(COMM, GROUP, IERROR)
INTEGER COMM, GROUP, IERROR
MPI INTERCOMM CREATE(LOCAL COMM, LOCAL LEADER, PEER COMM, REMOTE LEADER, TAG,
         NEWINTERCOMM, IERROR)
INTEGER LOCAL COMM, LOCAL LEADER, PEER COMM, REMOTE LEADER, TAG,
NEWINTERCOMM, IERROR
MPI INTERCOMM MERGE(INTERCOMM, HIGH, INTRACOMM, IERROR)
INTEGER INTERCOMM, INTRACOMM, IERROR
LOGICAL HIGH
MPI KEYVAL CREATE(COPY FN, DELETE FN, KEYVAL, EXTRA STATE, IERROR)
EXTERNAL COPY FN, DELETE FN
INTEGER KEYVAL, EXTRA STATE, IERROR
MPI KEYVAL FREE(KEYVAL, IERROR)
INTEGER KEYVAL, IERROR
MPI ATTR PUT(COMM, KEYVAL, ATTRIBUTE VAL, IERROR)
INTEGER COMM, KEYVAL, ATTRIBUTE VAL, IERROR
MPI ATTR GET(COMM, KEYVAL, ATTRIBUTE VAL, FLAG, IERROR)
INTEGER COMM, KEYVAL, ATTRIBUTE VAL, IERROR
LOGICAL FLAG
MPI ATTR DELETE(COMM, KEYVAL, IERROR)
INTEGER COMM, KEYVAL, IERROR

1.12 Fortran Bindings for Process Topologies

MPI CART CREATE(COMM OLD, NDIMS, DIMS, PERIODS, REORDER, COMM CART, IERROR)
INTEGER COMM OLD, NDIMS, DIMS(*), COMM CART, IERROR
LOGICAL PERIODS(*), REORDER
MPI DIMS CREATE(NNODES, NDIMS, DIMS, IERROR)
INTEGER NNODES, NDIMS, DIMS(*), IERROR
MPI GRAPH CREATE(COMM OLD, NNODES, INDEX, EDGES, REORDER, COMM GRAPH,
         IERROR)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

INTEGER COMM OLD, NNODES, INDEX(*), EDGES(*), COMM GRAPH, IERROR
LOGICAL REORDER
MPI TOPO TEST(COMM, STATUS, IERROR)
INTEGER COMM, STATUS, IERROR
MPI GRAPHDIMS GET(COMM, NNODES, NEDGES, IERROR)
INTEGER COMM, NNODES, NEDGES, IERROR
MPI GRAPH GET(COMM, MAXINDEX, MAXEDGES, INDEX, EDGES, IERROR)
INTEGER COMM, MAXINDEX, MAXEDGES, INDEX(*), EDGES(*), IERROR
MPI CARTDIM GET(COMM, NDIMS, IERROR)
INTEGER COMM, NDIMS, IERROR
MPI CART GET(COMM, MAXDIMS, DIMS, PERIODS, COORDS, IERROR)
INTEGER COMM, MAXDIMS, DIMS(*), COORDS(*), IERROR
LOGICAL PERIODS(*)
MPI CART RANK(COMM, COORDS, RANK, IERROR)
INTEGER COMM, COORDS(*), RANK, IERROR
MPI CART COORDS(COMM, RANK, MAXDIMS, COORDS, IERROR)
INTEGER COMM, RANK, MAXDIMS, COORDS(*), IERROR
MPI GRAPH NEIGHBORS COUNT(COMM, RANK, NNEIGHBORS, IERROR)
INTEGER COMM, RANK, NNEIGHBORS, IERROR
MPI GRAPH NEIGHBORS(COMM, RANK, MAXNEIGHBORS, NEIGHBORS, IERROR)
INTEGER COMM, RANK, MAXNEIGHBORS, NEIGHBORS(*), IERROR
MPI CART SHIFT(COMM, DIRECTION, DISP, RANK SOURCE, RANK DEST, IERROR)
INTEGER COMM, DIRECTION, DISP, RANK SOURCE, RANK DEST, IERROR
MPI CART SUB(COMM, REMAIN DIMS, NEWCOMM, IERROR)
INTEGER COMM, NEWCOMM, IERROR
LOGICAL REMAIN DIMS(*)
MPI CART MAP(COMM, NDIMS, DIMS, PERIODS, NEWRANK, IERROR)
INTEGER COMM, NDIMS, DIMS(*), NEWRANK, IERROR
LOGICAL PERIODS(*)
MPI GRAPH MAP(COMM, NNODES, INDEX, EDGES, NEWRANK, IERROR)
INTEGER COMM, NNODES, INDEX(*), EDGES(*), NEWRANK, IERROR

1.13 Fortran Bindings for Environmental Inquiry

MPI GET PROCESSOR NAME(NAME, RESULTLEN, IERROR)
CHARACTER*(*) NAME
INTEGER RESULTLEN, IERROR
MPI ERRHANDLER CREATE(FUNCTION, HANDLER, IERROR)
EXTERNAL FUNCTION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

    INTEGER ERRHANDLER, IERROR
MPI ERRHANDLER SET(COMM, ERRHANDLER, IERROR)
    INTEGER COMM, ERRHANDLER, IERROR
MPI ERRHANDLER GET(COMM, ERRHANDLER, IERROR)
    INTEGER COMM, ERRHANDLER, IERROR
MPI ERRHANDLER FREE(ERRHANDLER, IERROR)
    INTEGER ERRHANDLER, IERROR
MPI ERROR STRING(ERRORCODE, STRING, RESULTLEN, IERROR)
    INTEGER ERRORCODE, RESULTLEN, IERROR
    CHARACTER*(*) STRING
MPI ERROR CLASS(ERRORCODE, ERRORCLASS, IERROR)
    INTEGER ERRORCODE, ERRORCLASS, IERROR
DOUBLE PRECISION MPI WTIME()
DOUBLE PRECISION MPI WTICK()
MPI INIT(IERROR)
    INTEGER IERROR
MPI FINALIZE(IERROR)
    INTEGER IERROR
MPI INITIALIZED(FLAG, IERROR)
    LOGICAL FLAG
    INTEGER IERROR
MPI ABORT(COMM, ERRORCODE, IERROR)
    INTEGER COMM, ERRORCODE, IERROR

1.14 Fortran Bindings for Profiling

MPI PCONTROL(level)
    INTEGER LEVEL, . . .

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47