MPI Interface
This is the MPI interface. More...
Data Structures | |
| struct | MPI_Status_s |
| Status handle. More... | |
| struct | MPI_Request_s |
| Request handle. More... | |
Defines | |
| #define | MPI_PROC_NULL (-1) |
| Specify a "dummy" source or destination for communication. | |
| #define | MPI_ANY_SOURCE (-2) |
| Wilcard value for source. | |
| #define | MPI_ROOT (-3) |
| Specifies the root node for an intercommunicator collective communication. | |
| #define | MPI_ANY_TAG (-1) |
| Wilcard value for tag. | |
| #define | MPI_BOTTOM (void *)0 |
| Indicates address zero for the buffer argument. | |
| #define | MPI_MAX_PROCESSOR_NAME 256 |
| #define | MPI_MAX_ERROR_STRING 512 |
| #define | MPI_MAX_NAME_STRING 256 |
Typedefs | |
| typedef size_t | MPI_Aint |
| typedef int | MPI_Group |
| Group handle. | |
Functions: Collective communications | |
|
| |
| typedef void | MPI_User_function (void *, void *, int *, MPI_Datatype *) |
| User combination function. | |
| int | MPI_Barrier (MPI_Comm comm) |
| Blocks the caller until all group members have called the routine. | |
| int | MPI_Bcast (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) |
| Broadcasts a message from the process with rank root to all processes of the group, itself included. | |
| int | MPI_Gather (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) |
| Each process sends the contents of its send buffer to the root process. | |
| int | MPI_Gatherv (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm) |
| Extends the functionality of MPI_Gather() by allowing a varying count of data. | |
| int | MPI_Allgather (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) |
| Extends the functionality of MPI_Gather(), except all processes receive the result. | |
| int | MPI_Allgatherv (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, MPI_Comm comm) |
| Extends the functionality of MPI_Gatherv(), except all processes receive the result. | |
| int | MPI_Scatter (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) |
| Inverse operation of MPI_Gather(). | |
| int | MPI_Alltoall (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvType, MPI_Comm comm) |
| Extension of MPI_Allgather() to the case where each process sends distinct data to each of the receivers. | |
| int | MPI_Alltoallv (void *sendbuf, int *sendcount, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcount, int *recvdispls, MPI_Datatype recvType, MPI_Comm comm) |
| Adds flexibility to MPI_Alltoall() in that the location of data for the send is specified by sdispls and the location of the placement of the data on the receive side is specified by rdispls. | |
| int | MPI_Op_create (MPI_User_function *function, int commute, MPI_Op *op) |
| Binds a user-defined global operation to an op handle that can subsequently used in a global reduction operation. | |
| int | MPI_Op_free (MPI_Op *op) |
| Marks a user-defined reduction operation for deallocation. | |
| int | MPI_Reduce (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) |
| Combines the elements provided in the input buffer of each process in the group, using the operation op, and returns the combined value in the output buffer of the process with rank root. | |
| int | MPI_Allreduce (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) |
| Combines the elements provided in the input buffer of each process in the group, using the operation op, and returns the combined value in the output buffer of each process in the group. | |
| int | MPI_Reduce_scatter (void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) |
| First does an element-wise reduction on vector of elements in the send buffer defined by sendbuf, count and datatype. | |
Status of receive operation | |
|
| |
| typedef struct MPI_Status_s | MPI_Status |
| Status handle. | |
| #define | MPI_STATUS_SIZE 4 |
| Size of a status handle for the Fortran interface. | |
| #define | MPI_STATUS_IGNORE (MPI_Status *)0 |
| #define | MPI_STATUSES_IGNORE (MPI_Status *)0 |
Communication request for a non blocking communication. | |
|
| |
| typedef struct MPI_Request_s | MPI_Request |
| Request handle. | |
| #define | MPI_REQUEST_SIZE 4 |
| Size of a request handle for the Fortran interface. | |
| #define | MPI_REQUEST_NULL ((MPI_Request){{'\0'}}) |
| The special value MPI_REQUEST_NULL is used to indicate an invalid request handle. | |
Communicators | |
|
| |
| typedef int | MPI_Comm |
| Communicator handle. | |
| #define | MPI_COMM_NULL ((MPI_Comm)0) |
| Invalide request handle. | |
| #define | MPI_COMM_WORLD ((MPI_Comm)1) |
| Default communicator that includes all processes. | |
| #define | MPI_COMM_SELF ((MPI_Comm)2) |
| Communicator that includes only the process itself. | |
| #define | _MPI_COMM_OFFSET ((MPI_Comm)3) |
| Offset of the first user MPI communicator. | |
Basic datatypes | |
|
| |
| typedef int | MPI_Datatype |
| Datatype handle. | |
| #define | MPI_DATATYPE_NULL ((MPI_Datatype)0) |
| #define | MPI_CHAR ((MPI_Datatype)1) |
| #define | MPI_UNSIGNED_CHAR ((MPI_Datatype)2) |
| #define | MPI_BYTE ((MPI_Datatype)3) |
| #define | MPI_SHORT ((MPI_Datatype)4) |
| #define | MPI_UNSIGNED_SHORT ((MPI_Datatype)5) |
| #define | MPI_INT ((MPI_Datatype)6) |
| #define | MPI_UNSIGNED ((MPI_Datatype)7) |
| #define | MPI_LONG ((MPI_Datatype)8) |
| #define | MPI_UNSIGNED_LONG ((MPI_Datatype)9) |
| #define | MPI_FLOAT ((MPI_Datatype)10) |
| #define | MPI_DOUBLE ((MPI_Datatype)11) |
| #define | MPI_LONG_DOUBLE ((MPI_Datatype)12) |
| #define | MPI_LONG_LONG_INT ((MPI_Datatype)13) |
| #define | MPI_LONG_LONG ((MPI_Datatype)13) |
| #define | MPI_COMPLEX ((MPI_Datatype)23) |
| #define | MPI_DOUBLE_COMPLEX ((MPI_Datatype)24) |
| #define | MPI_LOGICAL ((MPI_Datatype)25) |
| #define | MPI_REAL ((MPI_Datatype)26) |
| #define | MPI_REAL4 ((MPI_Datatype)27) |
| #define | MPI_REAL8 ((MPI_Datatype)28) |
| #define | MPI_DOUBLE_PRECISION ((MPI_Datatype)29) |
| #define | MPI_INTEGER ((MPI_Datatype)30) |
| #define | MPI_INTEGER4 ((MPI_Datatype)31) |
| #define | MPI_INTEGER8 ((MPI_Datatype)32) |
| #define | MPI_PACKED ((MPI_Datatype)33) |
| #define | _MPI_DATATYPE_MAX ((MPI_Datatype)33) |
Collective operations | |
|
| |
| typedef int | MPI_Op |
| Operator handle. | |
| #define | MPI_OP_NULL (MPI_Op)(999) |
| #define | MPI_MAX (MPI_Op)(100) |
| #define | MPI_MIN (MPI_Op)(101) |
| #define | MPI_SUM (MPI_Op)(102) |
| #define | MPI_PROD (MPI_Op)(103) |
| #define | MPI_LAND (MPI_Op)(104) |
| #define | MPI_BAND (MPI_Op)(105) |
| #define | MPI_LOR (MPI_Op)(106) |
| #define | MPI_BOR (MPI_Op)(107) |
| #define | MPI_LXOR (MPI_Op)(108) |
| #define | MPI_BXOR (MPI_Op)(109) |
| #define | MPI_MINLOC (MPI_Op)(110) |
| #define | MPI_MAXLOC (MPI_Op)(111) |
| #define | _MPI_OP_FIRST ((MPI_Op)100) |
| #define | _MPI_OP_LAST ((MPI_Op)111) |
Extended modes | |
|
| |
| typedef int | MPI_Communication_Mode |
| #define | MPI_IMMEDIATE_MODE ((MPI_Communication_Mode)-1) |
| #define | MPI_READY_MODE ((MPI_Communication_Mode)-2) |
| #define | MPI_SYNCHRONOUS_MODE ((MPI_Communication_Mode)-3) |
Error handlers | |
|
| |
| typedef int | MPI_Errhandler |
| #define | MPI_ERRHANDLER_NULL ((MPI_Errhandler)0) |
| #define | MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)1) |
| #define | MPI_ERRORS_RETURN ((MPI_Errhandler)2) |
Functions: Communicators | |
|
| |
| int | MPI_Comm_group (MPI_Comm comm, MPI_Group *group) |
| Returns a handle to the group of the given communicator. | |
| int | MPI_Comm_split (MPI_Comm comm, int color, int key, MPI_Comm *newcomm) |
| Partitions the group associated to the communicator into disjoint subgroups, one for each value of color. | |
| int | MPI_Comm_dup (MPI_Comm comm, MPI_Comm *newcomm) |
| Creates a new intracommunicator with the same fixed attributes as the input intracommunicator. | |
| int | MPI_Comm_free (MPI_Comm *comm) |
| Marks the communication object for deallocation. | |
| int | MPI_Group_translate_ranks (MPI_Group group1, int n, int *ranks1, MPI_Group group2, int *ranks2) |
| Maps the rank of a set of processes in group1 to their rank in group2. | |
Functions: Environmental management | |
|
| |
| int | MPI_Init (int *argc, char ***argv) |
| This routine must be called before any other MPI routine. | |
| int | MPI_Init_thread (int *argc, char ***argv, int required, int *provided) |
| The following function may be used to initialize MPI, and initialize the MPI thread environment, instead of MPI_Init(). | |
| int | MPI_Initialized (int *flag) |
| Indicates whether MPI_Init has been called. | |
| int | MPI_Finalize (void) |
| This routine must be called by each process before it exits. | |
| int | MPI_Abort (MPI_Comm comm, int errorcode) |
| This routine makes a ``best attempt'' to abort all tasks in the group of comm. | |
| int | MPI_Comm_size (MPI_Comm comm, int *size) |
| This function indicates the number of processes involved in a an intracommunicator. | |
| int | MPI_Comm_rank (MPI_Comm comm, int *rank) |
| This function gives the rank of the process in the particular communicator's group. | |
| int | MPI_Attr_get (MPI_Comm comm, int keyval, void *attr_value, int *flag) |
| This function returns attributes values from communicators. | |
| int | MPI_Get_processor_name (char *name, int *resultlen) |
| This routine returns the name of the processor on which it was called at the moment of the call. | |
| double | MPI_Wtime (void) |
| Returns a floating-point number of seconds, representing elapsed wall-clock time since some time in the past. | |
| double | MPI_Wtick (void) |
| Returns the resolution of MPI_Wtime() in seconds. | |
| int | MPI_Error_string (int errorcode, char *string, int *resultlen) |
| Returns the error string associated with an error code or class. | |
| int | MPI_Errhandler_set (MPI_Comm comm, MPI_Errhandler errhandler) |
| Sets the error handler for a communicator. | |
| int | MPI_Get_version (int *version, int *subversion) |
| Returns the version. | |
Functions: User-defined datatypes and packing | |
|
| |
| int | MPI_Get_address (void *location, MPI_Aint *address) |
| Returns the byte address of location. | |
| int | MPI_Address (void *location, MPI_Aint *address) |
| Returns the byte address of location. | |
| int | MPI_Type_size (MPI_Datatype datatype, int *size) |
| Returns the total size, in bytes, of the entries in the type signature associated with datatype. | |
| int | MPI_Type_get_extent (MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent) |
| Returns the lower bound and the extent of datatype. | |
| int | MPI_Type_extent (MPI_Datatype datatype, MPI_Aint *extent) |
| Returns the extent of the datatype. | |
| int | MPI_Type_lb (MPI_Datatype datatype, MPI_Aint *lb) |
| Returns the lower bound of the datatype. | |
| int | MPI_Type_create_resized (MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype) |
| Returns in newtype a new datatype that is identical to oldtype, except that the lower bound of this new datatype is set to be lb, and its upper bound is set to lb + extent. | |
| int | MPI_Type_commit (MPI_Datatype *datatype) |
| Commits the datatype. | |
| int | MPI_Type_free (MPI_Datatype *datatype) |
| Marks the datatype object associated with datatype for deallocation. | |
| int | MPI_Type_optimized (MPI_Datatype *datatype, int optimized) |
| This function does not belong to the MPI standard: Marks the datatype object associated with datatype as being optimized, i.e the pack interface can be used for communications requests using that type, instead of copying the data into a contiguous buffer. | |
| int | MPI_Type_contiguous (int count, MPI_Datatype oldtype, MPI_Datatype *newtype) |
| Constructs a typemap consisting of the replication of a datatype into contiguous locations. | |
| int | MPI_Type_vector (int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype) |
| Constructs a typemap consisting of the replication of a datatype into location that consist of equally spaced blocks. | |
| int | MPI_Type_hvector (int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype) |
| Constructs a typemap consisting of the replication of a datatype into location that consist of equally spaced blocks, assumes that the stride between successive blocks is a multiple of the oldtype extent. | |
| int | MPI_Type_indexed (int count, int *array_of_blocklengths, int *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype) |
| Constructs a typemap consisting of the replication of a datatype into a sequence of blocks, each block is a concatenation of the old datatype. | |
| int | MPI_Type_hindexed (int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype) |
| Constructs a typemap consisting of the replication of a datatype into a sequence of blocks, each block is a concatenation of the old datatype; block displacements are specified in bytes, rather than in multiples of the old datatype extent. | |
| int | MPI_Type_struct (int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype *array_of_types, MPI_Datatype *newtype) |
| Constructs a typemap consisting of the replication of different datatypes, with different block sizes. | |
Functions: Persistent communications | |
|
| |
| int | MPI_Send_init (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) |
| Creates a persistent communication request for a standard mode send operation, and binds to it all the arguments of a send operation. | |
| int | MPI_Recv_init (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) |
| Creates a persistent communication request for a receive operation. | |
| int | MPI_Start (MPI_Request *request) |
| Initiates a persistent request. | |
| int | MPI_Startall (int count, MPI_Request *array_of_requests) |
| Start all communications associated with requests in array_of_requests. | |
Functions: Point-to-point communications | |
|
| |
| int | MPI_Send (void *buffer, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) |
| Performs a standard-mode, blocking send. | |
| int | MPI_Isend (void *buffer, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) |
| Posts a standard-mode, non blocking send. | |
| int | MPI_Rsend (void *buffer, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) |
| Performs a ready-mode, blocking send. | |
| int | MPI_Ssend (void *buffer, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) |
| Performs a synchronous-mode, blocking send. | |
| int | MPI_Pack (void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, int outsize, int *position, MPI_Comm comm) |
| Packs a message specified by inbuf, incount, datatype, comm into the buffer space specified by outbuf and outsize. | |
| int | MPI_Recv (void *buffer, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) |
| Performs a standard-mode, blocking receive. | |
| int | MPI_Irecv (void *buffer, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) |
| Posts a nonblocking receive. | |
| int | MPI_Unpack (void *inbuf, int insize, int *position, void *outbuf, int outcount, MPI_Datatype datatype, MPI_Comm comm) |
| Unpacks a message into the receive buffer specified by outbuf, outcount, datatype from the buffer space specified by inbuf and insize. | |
| int | MPI_Sendrecv (void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status) |
| Executes a blocking send and receive operation. | |
| int | MPI_Wait (MPI_Request *request, MPI_Status *status) |
| Returns when the operation identified by request is complete. | |
| int | MPI_Waitall (int count, MPI_Request *array_of_requests, MPI_Status *array_of_statuses) |
| Returns when all the operations identified by requests are complete. | |
| int | MPI_Waitany (int count, MPI_Request *array_of_requests, int *index, MPI_Status *status) |
| Blocks until one of the operations associated with the active requests in the array has completed. | |
| int | MPI_Test (MPI_Request *request, int *flag, MPI_Status *status) |
| Returns flag = true if the operation identified by request is complete. | |
| int | MPI_Testany (int count, MPI_Request *array_of_requests, int *index, int *flag, MPI_Status *status) |
| Tests for completion of one communication operation associated with requests in the array. | |
| int | MPI_Testsome (int count, MPI_Request *array_of_requests, int *outcount, int *indices, MPI_Status *statuses) |
| Tests for completion of several communication operations associated with requests in the array. | |
| int | MPI_Iprobe (int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status) |
| Nonblocking operation that returns flag = true if there is a message that can be received and that matches the message envelope specified by source, tag and comm. | |
| int | MPI_Probe (int source, int tag, MPI_Comm comm, MPI_Status *status) |
| Blocks and returns only after a message that matches the message envelope specified by source, tag and comm can be received. | |
| int | MPI_Cancel (MPI_Request *request) |
| Marks for cancellation a pending, nonblocking communication operation (send or receive). | |
| int | MPI_Request_free (MPI_Request *request) |
| Marks the request object for deallocation and set request to MPI_REQUEST_NULL. | |
| int | MPI_Get_count (MPI_Status *status, MPI_Datatype datatype, int *count) |
| Computes the number of entries received. | |
| int | MPI_Request_is_equal (MPI_Request request1, MPI_Request request2) |
| This function does not belong to the MPI standard: compares two request handles. | |
Error return classes | |
|
| |
| #define | MPI_SUCCESS 0 |
| Successful return code. | |
| #define | MPI_ERR_BUFFER 1 |
| #define | MPI_ERR_COUNT 2 |
| #define | MPI_ERR_TYPE 3 |
| #define | MPI_ERR_TAG 4 |
| #define | MPI_ERR_COMM 5 |
| #define | MPI_ERR_RANK 6 |
| #define | MPI_ERR_ROOT 7 |
| #define | MPI_ERR_GROUP 8 |
| #define | MPI_ERR_OP 9 |
| #define | MPI_ERR_TOPOLOGY 10 |
| #define | MPI_ERR_DIMS 11 |
| #define | MPI_ERR_ARG 12 |
| #define | MPI_ERR_UNKNOWN 13 |
| #define | MPI_ERR_TRUNCATE 14 |
| #define | MPI_ERR_OTHER 15 |
| #define | MPI_ERR_INTERN 16 |
| #define | MPI_ERR_IN_STATUS 17 |
| #define | MPI_ERR_PENDING 18 |
| #define | MPI_ERR_REQUEST 19 |
| #define | MPI_ERR_LASTCODE 1073741823 |
| #define | MPI_DATATYPE_ACTIVE 1 |
| Datatype still in use. | |
Pre-defined constants | |
|
| |
| #define | MPI_UNDEFINED (-32766) |
| #define | MPI_UNDEFINED_RANK MPI_UNDEFINED |
| #define | MPI_KEYVAL_INVALID 0 |
For supported thread levels | |
|
| |
| #define | MPI_THREAD_SINGLE 0 |
| #define | MPI_THREAD_FUNNELED 1 |
| #define | MPI_THREAD_SERIALIZED 2 |
| #define | MPI_THREAD_MULTIPLE 3 |
Communicator attributes | |
|
| |
| #define | MPI_TAG_UB 1 |
| #define | MPI_HOST 2 |
| #define | MPI_IO 3 |
| #define | MPI_WTIME_IS_GLOBAL 4 |
Detailed Description
This is the MPI interface.
The implementation called Mad-MPI is a new light implementation of the MPI standard. This simple, straightforward proof-of-concept implementation is a subset of the MPI API, that allows MPI applications to benefit from the NewMadeleine communication engine. Mad-MPI is based on the point-to-point nonblocking posting (isend, irecv) and completion (wait, test) operations of MPI, these four operations being directly mapped to the equivalent operations of NewMadeleine.
Mad-MPI also implements some optimizations mechanisms for derived datatypes. MPI derived datatypes deal with noncontiguous memory locations. The advanced optimizations of NewMadeleine allowing to reorder packets lead to a significant gain when sending and receiving data based on derived datatypes.
Define Documentation
| #define _MPI_COMM_OFFSET ((MPI_Comm)3) |
Offset of the first user MPI communicator.
Definition at line 147 of file mpi_types.h.
| #define _MPI_DATATYPE_MAX ((MPI_Datatype)33) |
Definition at line 183 of file mpi_types.h.
| #define _MPI_OP_FIRST ((MPI_Op)100) |
Definition at line 203 of file mpi_types.h.
| #define _MPI_OP_LAST ((MPI_Op)111) |
Definition at line 204 of file mpi_types.h.
| #define MPI_ANY_SOURCE (-2) |
Wilcard value for source.
Definition at line 35 of file mpi_types.h.
| #define MPI_ANY_TAG (-1) |
Wilcard value for tag.
Definition at line 44 of file mpi_types.h.
| #define MPI_BAND (MPI_Op)(105) |
Definition at line 196 of file mpi_types.h.
| #define MPI_BOR (MPI_Op)(107) |
Definition at line 198 of file mpi_types.h.
| #define MPI_BOTTOM (void *)0 |
Indicates address zero for the buffer argument.
Definition at line 47 of file mpi_types.h.
| #define MPI_BXOR (MPI_Op)(109) |
Definition at line 200 of file mpi_types.h.
| #define MPI_BYTE ((MPI_Datatype)3) |
Definition at line 157 of file mpi_types.h.
| #define MPI_CHAR ((MPI_Datatype)1) |
Definition at line 155 of file mpi_types.h.
| #define MPI_COMM_NULL ((MPI_Comm)0) |
Invalide request handle.
Definition at line 141 of file mpi_types.h.
| #define MPI_COMM_SELF ((MPI_Comm)2) |
Communicator that includes only the process itself.
Definition at line 145 of file mpi_types.h.
| #define MPI_COMM_WORLD ((MPI_Comm)1) |
Default communicator that includes all processes.
Definition at line 143 of file mpi_types.h.
| #define MPI_COMPLEX ((MPI_Datatype)23) |
Definition at line 170 of file mpi_types.h.
| #define MPI_DATATYPE_ACTIVE 1 |
Datatype still in use.
Definition at line 75 of file mpi_types.h.
| #define MPI_DATATYPE_NULL ((MPI_Datatype)0) |
Definition at line 154 of file mpi_types.h.
| #define MPI_DOUBLE ((MPI_Datatype)11) |
Definition at line 165 of file mpi_types.h.
| #define MPI_DOUBLE_COMPLEX ((MPI_Datatype)24) |
Definition at line 171 of file mpi_types.h.
| #define MPI_DOUBLE_PRECISION ((MPI_Datatype)29) |
Definition at line 176 of file mpi_types.h.
| #define MPI_ERR_ARG 12 |
Definition at line 64 of file mpi_types.h.
| #define MPI_ERR_BUFFER 1 |
Definition at line 53 of file mpi_types.h.
| #define MPI_ERR_COMM 5 |
Definition at line 57 of file mpi_types.h.
| #define MPI_ERR_COUNT 2 |
Definition at line 54 of file mpi_types.h.
| #define MPI_ERR_DIMS 11 |
Definition at line 63 of file mpi_types.h.
| #define MPI_ERR_GROUP 8 |
Definition at line 60 of file mpi_types.h.
| #define MPI_ERR_IN_STATUS 17 |
Definition at line 69 of file mpi_types.h.
| #define MPI_ERR_INTERN 16 |
Definition at line 68 of file mpi_types.h.
| #define MPI_ERR_LASTCODE 1073741823 |
Definition at line 72 of file mpi_types.h.
| #define MPI_ERR_OP 9 |
Definition at line 61 of file mpi_types.h.
| #define MPI_ERR_OTHER 15 |
Definition at line 67 of file mpi_types.h.
| #define MPI_ERR_PENDING 18 |
Definition at line 70 of file mpi_types.h.
| #define MPI_ERR_RANK 6 |
Definition at line 58 of file mpi_types.h.
| #define MPI_ERR_REQUEST 19 |
Definition at line 71 of file mpi_types.h.
| #define MPI_ERR_ROOT 7 |
Definition at line 59 of file mpi_types.h.
| #define MPI_ERR_TAG 4 |
Definition at line 56 of file mpi_types.h.
| #define MPI_ERR_TOPOLOGY 10 |
Definition at line 62 of file mpi_types.h.
| #define MPI_ERR_TRUNCATE 14 |
Definition at line 66 of file mpi_types.h.
| #define MPI_ERR_TYPE 3 |
Definition at line 55 of file mpi_types.h.
| #define MPI_ERR_UNKNOWN 13 |
Definition at line 65 of file mpi_types.h.
| #define MPI_ERRHANDLER_NULL ((MPI_Errhandler)0) |
Definition at line 222 of file mpi_types.h.
| #define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)1) |
Definition at line 224 of file mpi_types.h.
| #define MPI_ERRORS_RETURN ((MPI_Errhandler)2) |
Definition at line 225 of file mpi_types.h.
| #define MPI_FLOAT ((MPI_Datatype)10) |
Definition at line 164 of file mpi_types.h.
| #define MPI_HOST 2 |
Definition at line 231 of file mpi_types.h.
| #define MPI_IMMEDIATE_MODE ((MPI_Communication_Mode)-1) |
Definition at line 214 of file mpi_types.h.
| #define MPI_INT ((MPI_Datatype)6) |
Definition at line 160 of file mpi_types.h.
| #define MPI_INTEGER ((MPI_Datatype)30) |
Definition at line 177 of file mpi_types.h.
| #define MPI_INTEGER4 ((MPI_Datatype)31) |
Definition at line 178 of file mpi_types.h.
| #define MPI_INTEGER8 ((MPI_Datatype)32) |
Definition at line 179 of file mpi_types.h.
| #define MPI_IO 3 |
Definition at line 232 of file mpi_types.h.
| #define MPI_KEYVAL_INVALID 0 |
Definition at line 82 of file mpi_types.h.
| #define MPI_LAND (MPI_Op)(104) |
Definition at line 195 of file mpi_types.h.
| #define MPI_LOGICAL ((MPI_Datatype)25) |
Definition at line 172 of file mpi_types.h.
| #define MPI_LONG ((MPI_Datatype)8) |
Definition at line 162 of file mpi_types.h.
| #define MPI_LONG_DOUBLE ((MPI_Datatype)12) |
Definition at line 166 of file mpi_types.h.
| #define MPI_LONG_LONG ((MPI_Datatype)13) |
Definition at line 168 of file mpi_types.h.
| #define MPI_LONG_LONG_INT ((MPI_Datatype)13) |
Definition at line 167 of file mpi_types.h.
| #define MPI_LOR (MPI_Op)(106) |
Definition at line 197 of file mpi_types.h.
| #define MPI_LXOR (MPI_Op)(108) |
Definition at line 199 of file mpi_types.h.
| #define MPI_MAX (MPI_Op)(100) |
Definition at line 191 of file mpi_types.h.
| #define MPI_MAX_ERROR_STRING 512 |
Definition at line 208 of file mpi_types.h.
| #define MPI_MAX_NAME_STRING 256 |
Definition at line 209 of file mpi_types.h.
| #define MPI_MAX_PROCESSOR_NAME 256 |
Definition at line 207 of file mpi_types.h.
| #define MPI_MAXLOC (MPI_Op)(111) |
Definition at line 202 of file mpi_types.h.
| #define MPI_MIN (MPI_Op)(101) |
Definition at line 192 of file mpi_types.h.
| #define MPI_MINLOC (MPI_Op)(110) |
Definition at line 201 of file mpi_types.h.
| #define MPI_OP_NULL (MPI_Op)(999) |
Definition at line 190 of file mpi_types.h.
| #define MPI_PACKED ((MPI_Datatype)33) |
Definition at line 181 of file mpi_types.h.
| #define MPI_PROC_NULL (-1) |
Specify a "dummy" source or destination for communication.
Can be used instead of a rank wherever a source or a destination argument is required in a communication function.
Definition at line 32 of file mpi_types.h.
| #define MPI_PROD (MPI_Op)(103) |
Definition at line 194 of file mpi_types.h.
| #define MPI_READY_MODE ((MPI_Communication_Mode)-2) |
Definition at line 215 of file mpi_types.h.
| #define MPI_REAL ((MPI_Datatype)26) |
Definition at line 173 of file mpi_types.h.
| #define MPI_REAL4 ((MPI_Datatype)27) |
Definition at line 174 of file mpi_types.h.
| #define MPI_REAL8 ((MPI_Datatype)28) |
Definition at line 175 of file mpi_types.h.
| #define MPI_REQUEST_NULL ((MPI_Request){{'\0'}}) |
The special value MPI_REQUEST_NULL is used to indicate an invalid request handle.
Definition at line 131 of file mpi_types.h.
| #define MPI_REQUEST_SIZE 4 |
Size of a request handle for the Fortran interface.
Definition at line 118 of file mpi_types.h.
| #define MPI_ROOT (-3) |
Specifies the root node for an intercommunicator collective communication.
Definition at line 41 of file mpi_types.h.
| #define MPI_SHORT ((MPI_Datatype)4) |
Definition at line 158 of file mpi_types.h.
| #define MPI_STATUS_IGNORE (MPI_Status *)0 |
Definition at line 111 of file mpi_types.h.
| #define MPI_STATUS_SIZE 4 |
Size of a status handle for the Fortran interface.
Definition at line 97 of file mpi_types.h.
| #define MPI_STATUSES_IGNORE (MPI_Status *)0 |
Definition at line 112 of file mpi_types.h.
| #define MPI_SUCCESS 0 |
Successful return code.
Definition at line 52 of file mpi_types.h.
| #define MPI_SUM (MPI_Op)(102) |
Definition at line 193 of file mpi_types.h.
| #define MPI_SYNCHRONOUS_MODE ((MPI_Communication_Mode)-3) |
Definition at line 216 of file mpi_types.h.
| #define MPI_TAG_UB 1 |
Definition at line 230 of file mpi_types.h.
| #define MPI_THREAD_FUNNELED 1 |
Definition at line 87 of file mpi_types.h.
| #define MPI_THREAD_MULTIPLE 3 |
Definition at line 89 of file mpi_types.h.
| #define MPI_THREAD_SERIALIZED 2 |
Definition at line 88 of file mpi_types.h.
| #define MPI_THREAD_SINGLE 0 |
Definition at line 86 of file mpi_types.h.
| #define MPI_UNDEFINED (-32766) |
Definition at line 80 of file mpi_types.h.
| #define MPI_UNDEFINED_RANK MPI_UNDEFINED |
Definition at line 81 of file mpi_types.h.
| #define MPI_UNSIGNED ((MPI_Datatype)7) |
Definition at line 161 of file mpi_types.h.
| #define MPI_UNSIGNED_CHAR ((MPI_Datatype)2) |
Definition at line 156 of file mpi_types.h.
| #define MPI_UNSIGNED_LONG ((MPI_Datatype)9) |
Definition at line 163 of file mpi_types.h.
| #define MPI_UNSIGNED_SHORT ((MPI_Datatype)5) |
Definition at line 159 of file mpi_types.h.
| #define MPI_WTIME_IS_GLOBAL 4 |
Definition at line 233 of file mpi_types.h.
Typedef Documentation
| typedef size_t MPI_Aint |
Definition at line 92 of file mpi_types.h.
| typedef int MPI_Comm |
Communicator handle.
Definition at line 139 of file mpi_types.h.
| typedef int MPI_Communication_Mode |
Definition at line 213 of file mpi_types.h.
| typedef int MPI_Datatype |
Datatype handle.
Definition at line 153 of file mpi_types.h.
| typedef int MPI_Errhandler |
Definition at line 221 of file mpi_types.h.
| typedef int MPI_Group |
Group handle.
Definition at line 135 of file mpi_types.h.
| typedef int MPI_Op |
Operator handle.
Definition at line 189 of file mpi_types.h.
| typedef struct MPI_Request_s MPI_Request |
Request handle.
Definition at line 126 of file mpi_types.h.
| typedef struct MPI_Status_s MPI_Status |
Status handle.
Definition at line 109 of file mpi_types.h.
| typedef void MPI_User_function(void *, void *, int *, MPI_Datatype *) |
User combination function.
Definition at line 33 of file mpi_collective.h.
Function Documentation
| int MPI_Abort | ( | MPI_Comm | comm, | |
| int | errorcode | |||
| ) |
This routine makes a ``best attempt'' to abort all tasks in the group of comm.
- Parameters:
-
comm communicator of tasks to abort errorcode error code to return to invoking environment
- Returns:
- MPI status
| int MPI_Address | ( | void * | location, | |
| MPI_Aint * | address | |||
| ) |
Returns the byte address of location.
- Parameters:
-
location location in caller memory address address of location
- Returns:
- MPI status
| int MPI_Allgather | ( | void * | sendbuf, | |
| int | sendcount, | |||
| MPI_Datatype | sendtype, | |||
| void * | recvbuf, | |||
| int | recvcount, | |||
| MPI_Datatype | recvtype, | |||
| MPI_Comm | comm | |||
| ) |
Extends the functionality of MPI_Gather(), except all processes receive the result.
- Parameters:
-
sendbuf starting address of send buffer sendcount number of elements in send buffer sendtype data type of send buffer elements recvbuf address of receive buffer recvcount number of elements received from any process recvtype data type of receive buffer elements comm communicator
- Returns:
- MPI status
| int MPI_Allgatherv | ( | void * | sendbuf, | |
| int | sendcount, | |||
| MPI_Datatype | sendtype, | |||
| void * | recvbuf, | |||
| int * | recvcounts, | |||
| int * | displs, | |||
| MPI_Datatype | recvtype, | |||
| MPI_Comm | comm | |||
| ) |
Extends the functionality of MPI_Gatherv(), except all processes receive the result.
- Parameters:
-
sendbuf starting address of send buffer sendcount number of elements in send buffer sendtype data type of send buffer elements recvbuf address of receive buffer recvcounts integer array displs integer array recvtype data type of receive buffer elements comm communicator
- Returns:
- MPI status
| int MPI_Allreduce | ( | void * | sendbuf, | |
| void * | recvbuf, | |||
| int | count, | |||
| MPI_Datatype | datatype, | |||
| MPI_Op | op, | |||
| MPI_Comm | comm | |||
| ) |
Combines the elements provided in the input buffer of each process in the group, using the operation op, and returns the combined value in the output buffer of each process in the group.
- Parameters:
-
sendbuf starting address of send buffer recvbuf starting address of receive buffer count number of elements in send buffer datatype data type of elements of send buffer op operation comm communicator
- Returns:
- MPI status
| int MPI_Alltoall | ( | void * | sendbuf, | |
| int | sendcount, | |||
| MPI_Datatype | sendtype, | |||
| void * | recvbuf, | |||
| int | recvcount, | |||
| MPI_Datatype | recvType, | |||
| MPI_Comm | comm | |||
| ) |
Extension of MPI_Allgather() to the case where each process sends distinct data to each of the receivers.
The jth block sent from process i is received by process j and is placed in the ith block of recvbuf.
- Parameters:
-
sendbuf starting address of send buffer sendcount number of elements sent to each process sendtype data type of send buffer elements recvbuf address of receive buffer recvcount number of elements received from any process recvType data type of receive buffer elements comm communicator
- Returns:
- MPI status
| int MPI_Alltoallv | ( | void * | sendbuf, | |
| int * | sendcount, | |||
| int * | sdispls, | |||
| MPI_Datatype | sendtype, | |||
| void * | recvbuf, | |||
| int * | recvcount, | |||
| int * | recvdispls, | |||
| MPI_Datatype | recvType, | |||
| MPI_Comm | comm | |||
| ) |
Adds flexibility to MPI_Alltoall() in that the location of data for the send is specified by sdispls and the location of the placement of the data on the receive side is specified by rdispls.
- Parameters:
-
sendbuf starting address of send buffer sendcount integer array equal to the group size specifying the number of elements to send to each processor sdispls integer array of length group size. Entry j specifies the displacement relative to sendbuf from which to take the outgoing data destined for process j sendtype data type of send buffer elements recvbuf address of receive buffer recvcount integer array equal to the group size specifying the number of elements that can be received from each processor recvdispls integer array recvType data type of receive buffer elements comm communicator
- Returns:
- MPI status
| int MPI_Attr_get | ( | MPI_Comm | comm, | |
| int | keyval, | |||
| void * | attr_value, | |||
| int * | flag | |||
| ) |
This function returns attributes values from communicators.
| int MPI_Barrier | ( | MPI_Comm | comm | ) |
Blocks the caller until all group members have called the routine.
- Parameters:
-
comm communicator
- Returns:
- MPI status
| int MPI_Bcast | ( | void * | buffer, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | root, | |||
| MPI_Comm | comm | |||
| ) |
Broadcasts a message from the process with rank root to all processes of the group, itself included.
- Parameters:
-
buffer starting address of buffer count number of entries in buffer datatype data type of buffer root rank of broadcast root comm communicator
- Returns:
- MPI status
| int MPI_Cancel | ( | MPI_Request * | request | ) |
Marks for cancellation a pending, nonblocking communication operation (send or receive).
- Parameters:
-
request communication request handle
- Returns:
- MPI status
Creates a new intracommunicator with the same fixed attributes as the input intracommunicator.
- Parameters:
-
comm communicator newcomm copy of comm
- Returns:
- MPI status
| int MPI_Comm_free | ( | MPI_Comm * | comm | ) |
Marks the communication object for deallocation.
- Parameters:
-
comm communicator to be destroyed
- Returns:
- MPI status
Returns a handle to the group of the given communicator.
- Parameters:
-
comm communicator group group corresponding to comm
- Returns:
- MPI status
| int MPI_Comm_rank | ( | MPI_Comm | comm, | |
| int * | rank | |||
| ) |
This function gives the rank of the process in the particular communicator's group.
- Parameters:
-
comm communicator rank rank of the calling process in group of comm
- Returns:
- MPI status
| int MPI_Comm_size | ( | MPI_Comm | comm, | |
| int * | size | |||
| ) |
This function indicates the number of processes involved in a an intracommunicator.
- Parameters:
-
comm communicator size number of processes in the group of comm
- Returns:
- MPI status
Partitions the group associated to the communicator into disjoint subgroups, one for each value of color.
- Parameters:
-
comm communicator color control of subset assignment key control of rank assigment newcomm new communicator
- Returns:
- MPI status
| int MPI_Errhandler_set | ( | MPI_Comm | comm, | |
| MPI_Errhandler | errhandler | |||
| ) |
Sets the error handler for a communicator.
- Note:
- this function is mostly not implemented yet.
| int MPI_Error_string | ( | int | errorcode, | |
| char * | string, | |||
| int * | resultlen | |||
| ) |
Returns the error string associated with an error code or class.
The argument string must represent storage that is at least MPI_MAX_ERROR_STRING characters long.
- Parameters:
-
errorcode error code returned by an MPI routine string text that corresponds to the errorcode resultlen length (in printable characters) of the result returned in string
- Returns:
- MPI status.
| int MPI_Finalize | ( | void | ) |
This routine must be called by each process before it exits.
The call cleans up all MPI state.
- Returns:
- MPI status
| int MPI_Gather | ( | void * | sendbuf, | |
| int | sendcount, | |||
| MPI_Datatype | sendtype, | |||
| void * | recvbuf, | |||
| int | recvcount, | |||
| MPI_Datatype | recvtype, | |||
| int | root, | |||
| MPI_Comm | comm | |||
| ) |
Each process sends the contents of its send buffer to the root process.
- Parameters:
-
sendbuf starting address of send buffer sendcount number of elements in send buffer sendtype data type of send buffer elements recvbuf address of receive buffer recvcount number of elements for any single receive recvtype data type of recv buffer elements root rank of receiving process comm communicator
- Returns:
- MPI status
| int MPI_Gatherv | ( | void * | sendbuf, | |
| int | sendcount, | |||
| MPI_Datatype | sendtype, | |||
| void * | recvbuf, | |||
| int * | recvcounts, | |||
| int * | displs, | |||
| MPI_Datatype | recvtype, | |||
| int | root, | |||
| MPI_Comm | comm | |||
| ) |
Extends the functionality of MPI_Gather() by allowing a varying count of data.
- Parameters:
-
sendbuf starting address of send buffer sendcount number of elements in send buffer sendtype data type of send buffer elements recvbuf address of receive buffer (significant only at root) recvcounts integer array of length group size containing the number of elements that are received from each process (significant only at root) displs integer array of length group size. Entry i specifies the displacement relative to recvbuf at which to place the incoming data from process i (significant only at root) recvtype data type of recv buffer elements (significant only at root) root rank of receiving process comm communicator
- Returns:
- MPI status
| int MPI_Get_address | ( | void * | location, | |
| MPI_Aint * | address | |||
| ) |
Returns the byte address of location.
- Parameters:
-
location location in caller memory address address of location
- Returns:
- MPI status
| int MPI_Get_count | ( | MPI_Status * | status, | |
| MPI_Datatype | datatype, | |||
| int * | count | |||
| ) |
Computes the number of entries received.
- Parameters:
-
status return status of receive operation datatype datatype of each receive buffer entry count number of received entries
- Returns:
- MPI status
| int MPI_Get_processor_name | ( | char * | name, | |
| int * | resultlen | |||
| ) |
This routine returns the name of the processor on which it was called at the moment of the call.
- Parameters:
-
name unique specifier for the actual (as opposed to virtual) node resultlen length (in printable characters) of the result returned in name
- Returns:
- MPI status
| int MPI_Get_version | ( | int * | version, | |
| int * | subversion | |||
| ) |
Returns the version.
- Parameters:
-
version version number subversion subversion number
- Returns:
- MPI status.
| int MPI_Group_translate_ranks | ( | MPI_Group | group1, | |
| int | n, | |||
| int * | ranks1, | |||
| MPI_Group | group2, | |||
| int * | ranks2 | |||
| ) |
Maps the rank of a set of processes in group1 to their rank in group2.
- Parameters:
-
group1 group n number of ranks in ranks1 and ranks2 arrays ranks1 array of zero or more valid ranks in group1 group2 group ranks2 array of corresponding ranks in group2
- Returns:
- MPI status
| int MPI_Init | ( | int * | argc, | |
| char *** | argv | |||
| ) |
This routine must be called before any other MPI routine.
It must be called at most once; subsequent calls are erroneous.
- Parameters:
-
argc a pointer to the process argc. argv a pointer to the process argv.
- Returns:
- MPI status
| int MPI_Init_thread | ( | int * | argc, | |
| char *** | argv, | |||
| int | required, | |||
| int * | provided | |||
| ) |
The following function may be used to initialize MPI, and initialize the MPI thread environment, instead of MPI_Init().
- Parameters:
-
argc a pointer to the process argc. argv a pointer to the process argv. required level of thread support (integer). provided level of thread support (integer).
- Returns:
- MPI status
| int MPI_Initialized | ( | int * | flag | ) |
Indicates whether MPI_Init has been called.
- Parameters:
-
flag a pointer to an int set to 1 if MPI_Init has been called, 0 otherwise.
| int MPI_Iprobe | ( | int | source, | |
| int | tag, | |||
| MPI_Comm | comm, | |||
| int * | flag, | |||
| MPI_Status * | status | |||
| ) |
Nonblocking operation that returns flag = true if there is a message that can be received and that matches the message envelope specified by source, tag and comm.
- Parameters:
-
source source rank, or MPI_ANY_SOURCE tag tag value or MPI_ANY_TAG comm communicator flag true if operation has completed status status object
- Returns:
- MPI status
| int MPI_Irecv | ( | void * | buffer, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | source, | |||
| int | tag, | |||
| MPI_Comm | comm, | |||
| MPI_Request * | request | |||
| ) |
Posts a nonblocking receive.
- Parameters:
-
buffer initial address of receive buffer count number of elements in receive buffer datatype datatype of each receive buffer element source rank of source tag message tag comm communicator request pointer to request
- Returns:
- MPI status
| int MPI_Isend | ( | void * | buffer, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | dest, | |||
| int | tag, | |||
| MPI_Comm | comm, | |||
| MPI_Request * | request | |||
| ) |
Posts a standard-mode, non blocking send.
- Parameters:
-
buffer initial address of send buffer count number of elements in send buffer datatype datatype of each send buffer element dest rank of destination tag message tag comm communicator request pointer to request
- Returns:
- MPI status
| int MPI_Op_create | ( | MPI_User_function * | function, | |
| int | commute, | |||
| MPI_Op * | op | |||
| ) |
Binds a user-defined global operation to an op handle that can subsequently used in a global reduction operation.
- Parameters:
-
function user defined function commute true if commutative; false otherwise op operation
- Returns:
- MPI status
| int MPI_Op_free | ( | MPI_Op * | op | ) |
Marks a user-defined reduction operation for deallocation.
- Parameters:
-
op operation to be freed
- Returns:
- MPI status
| int MPI_Pack | ( | void * | inbuf, | |
| int | incount, | |||
| MPI_Datatype | datatype, | |||
| void * | outbuf, | |||
| int | outsize, | |||
| int * | position, | |||
| MPI_Comm | comm | |||
| ) |
Packs a message specified by inbuf, incount, datatype, comm into the buffer space specified by outbuf and outsize.
The input buffer can be any communication buffer allowed in MPI_SEND. The output buffer is a contiguous storage area containing outsize bytes, starting at the address outbuf.
- Parameters:
-
inbuf initial address of send buffer incount number of elements in send buffer datatype datatype of each send buffer element outbuf outsize position comm communicator
- Returns:
- MPI status
| int MPI_Probe | ( | int | source, | |
| int | tag, | |||
| MPI_Comm | comm, | |||
| MPI_Status * | status | |||
| ) |
Blocks and returns only after a message that matches the message envelope specified by source, tag and comm can be received.
- Parameters:
-
source source rank, or MPI_ANY_SOURCE tag tag value or MPI_ANY_TAG comm communicator status status object
- Returns:
- MPI status
| int MPI_Recv | ( | void * | buffer, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | source, | |||
| int | tag, | |||
| MPI_Comm | comm, | |||
| MPI_Status * | status | |||
| ) |
Performs a standard-mode, blocking receive.
- Parameters:
-
buffer initial address of receive buffer count number of elements in receive buffer datatype datatype of each receive buffer element source rank of source tag message tag comm communicator status status object
- Returns:
- MPI status
| int MPI_Recv_init | ( | void * | buf, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | source, | |||
| int | tag, | |||
| MPI_Comm | comm, | |||
| MPI_Request * | request | |||
| ) |
Creates a persistent communication request for a receive operation.
- Parameters:
-
buf initial address of receive buffer count number of elements received datatype type of each element source rank of source or MPI_ANY_SOURCE tag message tag or MPI_ANY_TAG comm communicator request communication request handle
- Returns:
- MPI status
| int MPI_Reduce | ( | void * | sendbuf, | |
| void * | recvbuf, | |||
| int | count, | |||
| MPI_Datatype | datatype, | |||
| MPI_Op | op, | |||
| int | root, | |||
| MPI_Comm | comm | |||
| ) |
Combines the elements provided in the input buffer of each process in the group, using the operation op, and returns the combined value in the output buffer of the process with rank root.
- Parameters:
-
sendbuf address of send buffer recvbuf address of receive buffer count number of elements in send buffer datatype data type of elements of send buffer op reduce operation root rank of root process comm communicator
- Returns:
- MPI status
| int MPI_Reduce_scatter | ( | void * | sendbuf, | |
| void * | recvbuf, | |||
| int * | recvcounts, | |||
| MPI_Datatype | datatype, | |||
| MPI_Op | op, | |||
| MPI_Comm | comm | |||
| ) |
First does an element-wise reduction on vector of elements in the send buffer defined by sendbuf, count and datatype.
Next, the resulting vector of results is split into n disjoint segments, where n is the number of members in the group. Segment i contains recvcounts[i] elements. The ith segment is sent to process i and stored in the receive buffer defined by recvbuf, recvcounts[i] and datatype.
- Parameters:
-
sendbuf starting address of send buffer recvbuf starting address of receive buffer recvcounts integer array specifying the number of elements in result distributed to each process. Array must be identical on all calling processes datatype data type of elements of input buffer op operation comm communicator
- Returns:
- MPI status
| int MPI_Request_free | ( | MPI_Request * | request | ) |
Marks the request object for deallocation and set request to MPI_REQUEST_NULL.
An ongoing communication that is associated with the request will be allowed to complete. The request will be deallocated only after its completion.
- Parameters:
-
request communication request handle
- Returns:
- MPI status
| int MPI_Request_is_equal | ( | MPI_Request | request1, | |
| MPI_Request | request2 | |||
| ) |
This function does not belong to the MPI standard: compares two request handles.
- Parameters:
-
request1 communication request handle request2 communication request handle
- Returns:
- 1 if request handles represent the same object
| int MPI_Rsend | ( | void * | buffer, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | dest, | |||
| int | tag, | |||
| MPI_Comm | comm | |||
| ) |
Performs a ready-mode, blocking send.
- Parameters:
-
buffer initial address of send buffer count number of elements in send buffer datatype datatype of each send buffer element dest rank of destination tag message tag comm communicator
- Returns:
- MPI status
| int MPI_Scatter | ( | void * | sendbuf, | |
| int | sendcount, | |||
| MPI_Datatype | sendtype, | |||
| void * | recvbuf, | |||
| int | recvcount, | |||
| MPI_Datatype | recvtype, | |||
| int | root, | |||
| MPI_Comm | comm | |||
| ) |
Inverse operation of MPI_Gather().
- Parameters:
-
sendbuf address of send buffer sendcount number of elements sent to each process sendtype data type of send buffer elements recvbuf address of receive buffer recvcount number of elements in receive buffer recvtype data type of receive buffer elements root rank of sending process comm communicator
- Returns:
- MPI status
| int MPI_Send | ( | void * | buffer, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | dest, | |||
| int | tag, | |||
| MPI_Comm | comm | |||
| ) |
Performs a standard-mode, blocking send.
- Parameters:
-
buffer initial address of send buffer count number of elements in send buffer datatype datatype of each send buffer element dest rank of destination tag message tag comm communicator
- Returns:
- MPI status
| int MPI_Send_init | ( | void * | buf, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | dest, | |||
| int | tag, | |||
| MPI_Comm | comm, | |||
| MPI_Request * | request | |||
| ) |
Creates a persistent communication request for a standard mode send operation, and binds to it all the arguments of a send operation.
- Parameters:
-
buf initial address of send buffer count number of elements sent datatype type of each element dest rank of destination tag message tag comm communicator request communication request handle
- Returns:
- MPI status
| int MPI_Sendrecv | ( | void * | sendbuf, | |
| int | sendcount, | |||
| MPI_Datatype | sendtype, | |||
| int | dest, | |||
| int | sendtag, | |||
| void * | recvbuf, | |||
| int | recvcount, | |||
| MPI_Datatype | recvtype, | |||
| int | source, | |||
| int | recvtag, | |||
| MPI_Comm | comm, | |||
| MPI_Status * | status | |||
| ) |
Executes a blocking send and receive operation.
- Parameters:
-
sendbuf initial address of send buffer sendcount number of elements in send buffer sendtype type of elements in send buffer dest rank of destination sendtag send tag recvbuf initial address of receive buffer recvcount number of elements in receive buffer recvtype type of elements in receive buffer source rank of source recvtag receive tag comm communicator status status object
- Returns:
- MPI status
| int MPI_Ssend | ( | void * | buffer, | |
| int | count, | |||
| MPI_Datatype | datatype, | |||
| int | dest, | |||
| int | tag, | |||
| MPI_Comm | comm | |||
| ) |
Performs a synchronous-mode, blocking send.
- Parameters:
-
buffer initial address of send buffer count number of elements in send buffer datatype datatype of each send buffer element dest rank of destination tag message tag comm communicator
- Returns:
- MPI status
| int MPI_Start | ( | MPI_Request * | request | ) |
Initiates a persistent request.
The associated request should be inactive. The request becomes active once the call is made. If the request is for a send with ready mode, then a matching receive should be posted before the call is made. The communication buffer should not be accessed after the call, and until the operation completes.
- Parameters:
-
request communication request handle
- Returns:
- MPI status
| int MPI_Startall | ( | int | count, | |
| MPI_Request * | array_of_requests | |||
| ) |
Start all communications associated with requests in array_of_requests.
- Parameters:
-
count list length array_of_requests array of requests
- Returns:
- MPI status
| int MPI_Test | ( | MPI_Request * | request, | |
| int * | flag, | |||
| MPI_Status * | status | |||
| ) |
Returns flag = true if the operation identified by request is complete.
- Parameters:
-
request communication request handle flag true if operation completed status status object
- Returns:
- MPI status
| int MPI_Testany | ( | int | count, | |
| MPI_Request * | array_of_requests, | |||
| int * | index, | |||
| int * | flag, | |||
| MPI_Status * | status | |||
| ) |
Tests for completion of one communication operation associated with requests in the array.
- Parameters:
-
count list length array_of_requests array of request handles index index of request handle that completed flag true if one has completed status status object
- Returns:
- MPI status
| int MPI_Testsome | ( | int | count, | |
| MPI_Request * | array_of_requests, | |||
| int * | outcount, | |||
| int * | indices, | |||
| MPI_Status * | statuses | |||
| ) |
Tests for completion of several communication operations associated with requests in the array.
- Parameters:
-
count list length array_of_requests array of request handles outcount is the number of request handle completed indices are the indices or request handle completed in array_of_requests statuses array of statuses of the completed operations
- Returns:
- MPI status
| int MPI_Type_commit | ( | MPI_Datatype * | datatype | ) |
Commits the datatype.
- Parameters:
-
datatype datatype that is committed
- Returns:
- MPI status
| int MPI_Type_contiguous | ( | int | count, | |
| MPI_Datatype | oldtype, | |||
| MPI_Datatype * | newtype | |||
| ) |
Constructs a typemap consisting of the replication of a datatype into contiguous locations.
- Parameters:
-
count replication count oldtype old datatype newtype new datatype
- Returns:
- MPI status
| int MPI_Type_create_resized | ( | MPI_Datatype | oldtype, | |
| MPI_Aint | lb, | |||
| MPI_Aint | extent, | |||
| MPI_Datatype * | newtype | |||
| ) |
Returns in newtype a new datatype that is identical to oldtype, except that the lower bound of this new datatype is set to be lb, and its upper bound is set to lb + extent.
- Parameters:
-
oldtype input datatype lb new lower bound of datatype extent new extent of datatype newtype output datatype
- Returns:
- MPI status
| int MPI_Type_extent | ( | MPI_Datatype | datatype, | |
| MPI_Aint * | extent | |||
| ) |
Returns the extent of the datatype.
- Parameters:
-
datatype datatype extent extent of datatype
- Returns:
- MPI status
| int MPI_Type_free | ( | MPI_Datatype * | datatype | ) |
Marks the datatype object associated with datatype for deallocation.
- Parameters:
-
datatype datatype that is freed
- Returns:
- MPI status
| int MPI_Type_get_extent | ( | MPI_Datatype | datatype, | |
| MPI_Aint * | lb, | |||
| MPI_Aint * | extent | |||
| ) |
Returns the lower bound and the extent of datatype.
- Parameters:
-
datatype datatype lb lower bound of datatype extent extent of datatype
- Returns:
- MPI status
| int MPI_Type_hindexed | ( | int | count, | |
| int * | array_of_blocklengths, | |||
| MPI_Aint * | array_of_displacements, | |||
| MPI_Datatype | oldtype, | |||
| MPI_Datatype * | newtype | |||
| ) |
Constructs a typemap consisting of the replication of a datatype into a sequence of blocks, each block is a concatenation of the old datatype; block displacements are specified in bytes, rather than in multiples of the old datatype extent.
- Parameters:
-
count number of blocks -- also number of entries in array_of_displacements and array_of_blocklengths array_of_blocklengths number of elements per block array_of_displacements byte displacement of each block oldtype old datatype newtype new datatype
- Returns:
- MPI status
| int MPI_Type_hvector | ( | int | count, | |
| int | blocklength, | |||
| int | stride, | |||
| MPI_Datatype | oldtype, | |||
| MPI_Datatype * | newtype | |||
| ) |
Constructs a typemap consisting of the replication of a datatype into location that consist of equally spaced blocks, assumes that the stride between successive blocks is a multiple of the oldtype extent.
- Parameters:
-
count number of blocks blocklength number of elements in each block stride number of bytes between start of each block oldtype old datatype newtype new datatype
- Returns:
- MPI status
| int MPI_Type_indexed | ( | int | count, | |
| int * | array_of_blocklengths, | |||
| int * | array_of_displacements, | |||
| MPI_Datatype | oldtype, | |||
| MPI_Datatype * | newtype | |||
| ) |
Constructs a typemap consisting of the replication of a datatype into a sequence of blocks, each block is a concatenation of the old datatype.
- Parameters:
-
count number of blocks -- also number of entries in array_of_displacements and array_of_blocklengths array_of_blocklengths number of elements per block array_of_displacements displacement for each block, in multiples of oldtype extent oldtype old datatype newtype new datatype
- Returns:
- MPI status
| int MPI_Type_lb | ( | MPI_Datatype | datatype, | |
| MPI_Aint * | lb | |||
| ) |
Returns the lower bound of the datatype.
- Parameters:
-
datatype datatype lb lower bound of datatype
- Returns:
- MPI status
| int MPI_Type_optimized | ( | MPI_Datatype * | datatype, | |
| int | optimized | |||
| ) |
This function does not belong to the MPI standard: Marks the datatype object associated with datatype as being optimized, i.e the pack interface can be used for communications requests using that type, instead of copying the data into a contiguous buffer.
- Parameters:
-
datatype datatype that is set as optimised or not optimized specified if the datatype should be marked as optimised or not
- Returns:
- MPI status
| int MPI_Type_size | ( | MPI_Datatype | datatype, | |
| int * | size | |||
| ) |
Returns the total size, in bytes, of the entries in the type signature associated with datatype.
- Parameters:
-
datatype datatype size datatype size
- Returns:
- MPI status
| int MPI_Type_struct | ( | int | count, | |
| int * | array_of_blocklengths, | |||
| MPI_Aint * | array_of_displacements, | |||
| MPI_Datatype * | array_of_types, | |||
| MPI_Datatype * | newtype | |||
| ) |
Constructs a typemap consisting of the replication of different datatypes, with different block sizes.
- Parameters:
-
count number of blocks -- also number of entries in arrays array_of_types, array_of_displacements and array_of_blocklengths array_of_blocklengths number of elements in each block array_of_displacements byte displacement of each block array_of_types type of elements in each block newtype new datatype
- Returns:
- MPI status
| int MPI_Type_vector | ( | int | count, | |
| int | blocklength, | |||
| int | stride, | |||
| MPI_Datatype | oldtype, | |||
| MPI_Datatype * | newtype | |||
| ) |
Constructs a typemap consisting of the replication of a datatype into location that consist of equally spaced blocks.
- Parameters:
-
count number of blocks blocklength number of elements in each block stride number of elements between start of each block oldtype old datatype newtype new datatype
- Returns:
- MPI status
| int MPI_Unpack | ( | void * | inbuf, | |
| int | insize, | |||
| int * | position, | |||
| void * | outbuf, | |||
| int | outcount, | |||
| MPI_Datatype | datatype, | |||
| MPI_Comm | comm | |||
| ) |
Unpacks a message into the receive buffer specified by outbuf, outcount, datatype from the buffer space specified by inbuf and insize.
The output buffer can be any communication buffer allowed in MPI_RECV. The input buffer is a contiguous storage area containing insize bytes, starting at address inbuf. The input value of position is the position in the input buffer where one wishes the unpacking to begin. The output value of position is incremented by the size of the packed message, so that it can be used as input to a subsequent call to MPI_UNPACK.
- Parameters:
-
inbuf initial address of receive buffer insize number of elements in receive buffer position outbuf outcount datatype datatype of each receive buffer element comm communicator
- Returns:
- MPI status
| int MPI_Wait | ( | MPI_Request * | request, | |
| MPI_Status * | status | |||
| ) |
Returns when the operation identified by request is complete.
- Parameters:
-
request request status status object
- Returns:
- MPI status
| int MPI_Waitall | ( | int | count, | |
| MPI_Request * | array_of_requests, | |||
| MPI_Status * | array_of_statuses | |||
| ) |
Returns when all the operations identified by requests are complete.
- Parameters:
-
count lists length array_of_requests array of requests array_of_statuses array of status objects
- Returns:
- MPI status
| int MPI_Waitany | ( | int | count, | |
| MPI_Request * | array_of_requests, | |||
| int * | index, | |||
| MPI_Status * | status | |||
| ) |
Blocks until one of the operations associated with the active requests in the array has completed.
If more then one operation is enabled and can terminate, one is arbitrarily chosen. Returns in index the index of that request in the array and returns in status the status of the completing communication. If the request was allocated by a nonblocking communication operation, then it is deallocated and the request handle is set to MPI_REQUEST_NULL.
- Parameters:
-
count list length array_of_requests array of requests index index of handle for operation that completed status status object
- Returns:
- MPI status
| double MPI_Wtick | ( | void | ) |
Returns the resolution of MPI_Wtime() in seconds.
- Returns:
- resolution of MPI_Wtime() in seconds
| double MPI_Wtime | ( | void | ) |
Returns a floating-point number of seconds, representing elapsed wall-clock time since some time in the past.
- Returns:
- floating-point number of seconds