Constants and Structures


MPI_Datatype

Note that the Fortran types should only be used in Fortran programs, and the C types should only be used in C programs. For example, it is in error to use MPI_INT for a Fortran INTEGER. Datatypes are of type MPI_Datatype in C and of type INTEGER in Fortran.

C Datatypes

MPI_CHAR char
MPI_SIGNED_CHAR char, same as MPI_CHAR
MPI_UNSIGNED_CHAR unsigned char
MPI_WCHAR wchar_t, wide character
MPI_BYTE See standard; like unsigned char
MPI_SHORT short
MPI_INT int
MPI_LONG long
MPI_FLOAT float
MPI_DOUBLE double
MPI_UNSIGNED_SHORT unsigned short
MPI_UNSIGNED unsigned int
MPI_UNSIGNED_LONG unsigned long
MPI_LONG_DOUBLE long double (supported by csWMPI II, however some systems may not implement)
MPI_LONG_LONG a long long int (a 64 bit signed integer, __int64 in Windows)

The following are datatypes for the MPI function where MPI_MAXLOC and MPI_MINLOC are used:

MPI_FLOAT_INT struct { float, int }
MPI_LONG_INT struct { long, int }
MPI_DOUBLE_INT struct { double, int }
MPI_SHORT_INT struct { short, int }
MPI_2INT struct { int, int }
MPI_LONG_DOUBLE_INT struct { long double, int }

Fortran Datatypes

MPI_REAL REAL
MPI_INTEGER INTEGER
MPI_LOGICAL LOGICAL
MPI_DOUBLE_PRECISION DOUBLE PRECISION
MPI_COMPLEX COMPLEX
MPI_DOUBLE_COMPLEX complex*16 (or complex*32).
MPI_INTEGER1 integer*1
MPI_INTEGER2 integer*2
MPI_INTEGER4 integer*4
MPI_REAL4 real*4
MPI_REAL8 real*8
MPI_CHARACTER character

The following are datatypes for MPI function where MPI_MAXLOC and MPI_MINLOC are used. In Fortran, these datatype always consist of two elements of the same Fortran type:

MPI_2INTEGER INTEGER,INTEGER
MPI_2REAL REAL, REAL
MPI_2DOUBLE_PRECISION DOUBLE PRECISION, DOUBLE PRECISION
MPI_2COMPLEX COMPLEX, COMPLEX
MPI_2DOUBLE_COMPLEX complex*16, complex*16

Subarray and darray constructors

For the MPI_Type_create_darray and MPI_Type_create_subarray function:

MPI_ORDER_C Row-major order
MPI_ORDER_FORTRAN Column-major order
MPI_DISTRIBUTE_BLOCK Block distribution
MPI_DISTRIBUTE_CYCLIC Cyclic distribution
MPI_DISTRIBUTE_NONE Dimension not distributed
MPI_DISTRIBUTE_DFLT_DARG Default distribution

Special Datatypes

MPI_PACKED For MPI_Pack and MPI_Unpack
MPI_UB For MPI_Type_struct; an upper-bound indicator
MPI_LB For MPI_Type_struct; a lower-bound indicator
MPI_DATATYPE_NULL Null datatype


MPI_Comm

Communicators are of type MPI_Comm in C and INTEGER in Fortran. The following table lists predefined communicators:

MPI_COMM_WORLD Contains all processes started by the same operation (by the operating system or by another csWMPI II application) as this caller.
MPI_COMM_SELF Contains only the calling process
MPI_COMM_NULL Null communicator

Predefined Attributes

Predefined attribute on MPI_COMM_WORLD. They can be obtained through MPI_Attr_get:

MPI_UNIVERSE_SIZE Supported for compatibility reasons. csWMPI II licenses do not limit the number of processes but the number of CPUs, thus the value assigned to this attribute is high.
MPI_APPNUM Always 0.

Topology Types

MPI_GRAPH General graph
MPI_CART Cartesian grid


MPI_Group

Groups are of type MPI_Group in C and INTEGER in Fortran. The following table lists the predefined groups:

MPI_GROUP_EMPTY A group containing no members.
MPI_GROUP_NULL Null group

Possible results of group compare operations:

MPI_IDENT Identical
MPI_CONGRUENT (only for MPI_COMM_COMPARE) The groups are identical
MPI_SIMILAR Same members, but in a different order
MPI_UNEQUAL Different


MPI_Op

The collective combination operations (MPI_Reduce, MPI_Allreduce, MPI_Reduce_Scatter, and MPI_Scan), take a combination operation. This operation is of type MPI_Op in C and of type INTEGER in Fortran. The predefined operations are the following:

MPI_MAX return the maximum
MPI_MIN return the minumum
MPI_SUM return the sum
MPI_PROD return the product
MPI_LAND return the logical and
MPI_BAND return the bitwise and
MPI_LOR return the logical or
MPI_BOR return the bitwise of
MPI_LXOR return the logical exclusive or
MPI_BXOR return the bitwise exclusive or
MPI_MINLOC return the minimum and the location (actually, the value of the second element of the structure where the minimum of the first is found)
MPI_MAXLOC return the maximum and the location
MPI_REPLACE replaces the current value of the target memory by the value supplied by the origin, for MPI_Accumulate.
MPI_OP_NULL Null operation

Notes on collective operations

The reduction functions (MPI_Op) do not return an error value. As a result, if the functions detect an error, all they can do is either call MPI_Abort or silently skip the problem. Thus, if you change the error handler from MPI_ERRORS_ARE_FATAL to something else, for example, MPI_ERRORS_RETURN, then no error may be indicated.

The reason for this is the performance problems in ensuring that all collective routines return the same error value.

Note that not all datatypes are valid for these functions. For example, MPI_COMPLEX is not valid for MPI_MAX and MPI_MIN.


MPI_Info

Info objects are of the type MPI_Info in C and INTEGER in Fortran. They contain (key, value) pairs. It is an opaque object created, accessed, and deleted through the following functions: MPI_Info_create, MPI_Info_set, MPI_Info_delete, MPI_Info_get, MPI_Info_get_valuelen, MPI_Info_get_nkeys, MPI_Info_get_nthkey, MPI_Info_dup, and MPI_Info_free.

For a list of info keys recognized by csWMPI II refer to Recognized Info Keys in the User Guide section.

Predefined info object:

MPI_INFO_NULL Null info object


MPI_File

Files are of type MPI_File in C and INTEGER in Fortran. Predefined file object:

MPI_FILE_NULL Null file

File Access Modes

The following table lists the file modes for MPI_File_open:

MPI_MODE_RDONLY Read only
MPI_MODE_WRONLY Write only
MPI_MODE_RDWR Reading and writing
MPI_MODE_CREATE Create file if it does not exist
MPI_MODE_DELETE_ON_CLOSE delete the file on close
MPI_MODE_SEQUENTIAL file will only be accessed sequentially
MPI_MODE_EXCL error if file already exists
MPI_MODE_APPEND set initial position of all file pointers to the end of file
MPI_MODE_UNIQUE_OPEN file will not be concurrently opened elsewhere

File Seek Modes

MPI_SEEK_SET Seek to offset (MPI_File_seek and MPI_File_seek_shared)
MPI_SEEK_CUR Seek to current position + offset (MPI_File_seek and MPI_File_seek_shared)
MPI_SEEK_END Seek to the end of file + offset (MPI_File_seek and MPI_File_seek_shared)


MPI_Win

Windows are of type MPI_Win in C and INTEGER in Fortran. Predefined window object:

MPI_WIN_NULL Null window

Lock Types

MPI_LOCK_SHARED A shared lock on a window (MPI_Win_lock)
MPI_LOCK_EXCLUSIVE An exclusive lock on a window (MPI_Win_lock)

Window Hints

MPI_MODE_NOCHECK The matching calls to MPI_Win_post have already been completed on all target processes (MPI_Win_start)
MPI_MODE_NOSTORE The local window was not updated by local stores (MPI_Win_create)
MPI_MODE_NOPUT The local window was not updated by put or accumulate calls (MPI_Win_fence)
MPI_MODE_NOPRECEDE The fence does not complete any sequence of locally issued RMA calls (MPI_Win_fence)
MPI_MODE_NOSUCCEED The fence does start any sequence of locally issued RMA calls(MPI_Win_fence)


MPI_Status

The MPI_Status is a structure. The three elements for use by programmers are:

MPI_SOURCE Who sent the message
MPI_TAG What tag the message was sent with
MPI_ERROR Any error return

One of the following special constants can be used as parameter in case the status should be ignored a MPI function:

MPI_STATUS_IGNORE Reference constant specifying csWMPI II can ignore the status object.
MPI_STATUSES_IGNORE Reference constant specifying csWMPI II can ignore the array of status objects.


MPI_Request

The MPI_Request are opaque objects. Nonblocking communications use request objects to identify communication operations and link the posting operation to the completion operation.

Null object:

MPI_REQUEST_NULL Null request


MPI_Errhandler

Error handlers are associeated at each process with each communicator, file, or window object. The following table lists predefined error handlers:

MPI_ERRORS_ARE_FATAL In case an error occurs all processes are aborted.
MPI_ERRORS_RETURN In case an error occurs it is returned to the user.
MPI_ERRHANDLER_NULL Null error handler


MPI Error classes

MPI_SUCCESS No error
MPI_ERR_BUFFER Invalid buffer pointer
MPI_ERR_COUNT Invalid count argument
MPI_ERR_TYPE Invalid datatype argument
MPI_ERR_TAG Invalid tag argument
MPI_ERR_COMM Invalid communicator
MPI_ERR_RANK Invalid rank
MPI_ERR_ROOT Invalid root
MPI_ERR_GROUP Null group passed to function
MPI_ERR_OP Invalid operation
MPI_ERR_TOPOLOGY Invalid topology
MPI_ERR_DIMS Illegal dimension argument
MPI_ERR_ARG Invalid argument
MPI_ERR_UNKNOWN Unknown error
MPI_ERR_TRUNCATE message truncated on receive
MPI_ERR_OTHER Other error; use Error_string
MPI_ERR_INTERN internal error code
MPI_ERR_IN_STATUS Look in status for error value
MPI_ERR_PENDING Pending request
MPI_ERR_REQUEST illegal mpi_request handle
MPI_ERR_WIN invalid win argument
MPI_ERR_BASE invalid base argument
MPI_ERR_SIZE invalid size argument
MPI_ERR_DISP invalid disp argument
MPI_ERR_LOCKTYPE invalid locktype argument
MPI_ERR_ASSERT invalid assert argument
MPI_ERR_RMA_CONFLICT conflicting accesses to window
MPI_ERR_RMA_SYNC wrong synchronization of RMA calls
MPI_ERR_PORT Named port does not exist (or has been closed)
MPI_ERR_NAME Service name does not exist
MPI_ERR_SERVICE Service not registered
MPI_ERR_ACCESS Permission denied
MPI_ERR_AMODE Error related to the acess mode
MPI_ERR_BAD_FILE Invalid file name
MPI_ERR_CONVERSION An error occured in a user supplied data conversion function
MPI_ERR_DUP_DATAREP Datarep already exists with this name
MPI_ERR_FILE Invalid file handle
MPI_ERR_FILE_EXISTS File exists
MPI_ERR_FILE_IN_USE File operation cannot be completed, the file is in use by another process
MPI_ERR_IO Other I/O Error
MPI_ERR_NO_SPACE Not enough Space
MPI_ERR_NO_SUCH_FILE File does not exists
MPI_ERR_NOT_SAME Collective argument no identical on all processes or collective routines called in a different order by diferent processes
MPI_ERR_QUOTA Quota exceeded
MPI_ERR_READ_ONLY Read only file in this system
MPI_ERR_UNSUPPORTED_DATAREP Unsupported datarep passed to MPI_FILE_SET_VIEW
MPI_ERR_UNSUPPORTED_OPERATION Unsupported operation
MPI_ERR_NO_MEM Memory exhausted
MPI_ERR_LASTCODE Last error code


Thread-safety

csWMPI II is thread-compliant, which means that multiple threads are allowed to call to MPI functions concurrently. It is recommended that each thread uses a unique communicator.

The following constants can be used for MPI_Init_thread.

MPI_THREAD_SINGLE Single-threaded application
MPI_THREAD_FUNNELED Only the main thread of an application will call MPI functions
MPI_THREAD_SERIALIZED Only one thread will make an MPI call at a time
MPI_THREAD_MULTIPLE Multiple thread may call MPI functions concurrently


Other

MPI_MAX_PROCESSOR_NAME Maximum length of name returned by MPI_GET_PROCESSOR_NAME
MPI_MAX_ERROR_STRING Maximum length of string returned by MPI_ERROR_STRING
MPI_MAX_OBJECT_NAME Maximum length of object name strings
MPI_MAX_PORT_NAME Maximum length of a port name supplied by csWMPI II.
MPI_MAX_SERVICE_NAME Maximum length of a service name
MPI_MAX_INFO_KEY Maximum length of an info key name
MPI_MAX_INFO_VAL Maximum length of an info key value
MPI_MAX_DATAREP_STRING Maximum length a data representation string
MPI_UNDEFINED Used by many routines to indicated undefined or unknown integer value
MPI_UNDEFINED_RANK Unknown rank
MPI_KEYVAL_INVALID Special keyval that may be used to detect uninitialized keyvals.
MPI_BSEND_OVERHEAD Add this to the size of a MPI_BSEND buffer for each outstanding message
MPI_PROC_NULL This rank may be used to send or receive from no-one.
MPI_ROOT Special value supplied by the root process of a (rooted) extended collective operation over an inter-communicator.
MPI_ANY_SOURCE In a receive, accept a message from anyone.
MPI_ANY_TAG In a receive, accept a message with any tag value.
MPI_BOTTOM May be used to indicate the bottom of the address space
MPI_IN_PLACE Reference constant specifying that the same communication buffer should be used for sending and receiving data. Applicable to some collective operations.
MPI_ERRCODES_IGNORE Reference constant specifying csWMPI II can ignore the array of error codes in MPI_Comm_spawn_multiple.
MPI_TAG_UB Largest tag value
MPI_HOST Rank of process that is host, if any
MPI_IO Rank of process that can do I/O
MPI_WTIME_IS_GLOBAL Has value 1 if MPI_WTIME is globally synchronized.
MPI_Aint Address argument representing an absolute address in the calling program
MPI_Fint Datatype for C and C++ which matches the size of a Fortran INTEGER
MPI_Offset Offset into a file.




© 2009 Critical Software SA. All trademarks and copyrights on this page are owned by their respective owners.
cscsWMPI II™, cscsWMPI™ and PatentMPI™ are trademarks of Critical Software SA. All Rights Reserved.